I am using following code for access token OAuthClientRequest.tokenProvider(OAuthProviderType.GOOGLE). setGrantType(GrantType.AUTHORIZATION_CODE). setClientIdkey).setClientSecret(secret). setRedirectURI(callbackURL). setCode(authorizationCode).buildQueryMessage();
But with this I am not able to find buildPostMessage Only these options are there 1. buildBodyMessage() 2. buildHeaderMessage() 3. buildQueryMessage() On Mon, Jan 6, 2014 at 10:56 PM, Maciej Machulak <maciej.machu...@gmail.com>wrote: > Try using the buildPostMessage() > > > On 6 January 2014 17:24, Umesh Awasthi <umeshawas...@gmail.com> wrote: > >> In All cases I am using buildQueryMessage() >> >> >> On Mon, Jan 6, 2014 at 10:51 PM, Maciej Machulak < >> maciej.machu...@gmail.com> wrote: >> >>> Hi, >>> >>> See if you are using .buildQueryMessage(); or .buildPostMessage() when >>> exchanging the code for an access token. I think that the documentation >>> states the first one, while you should be using the latter one. >>> >>> I hope this helps, cheers, Maciej >>> >>> >>> On 6 January 2014 17:18, Umesh Awasthi <umeshawas...@gmail.com> wrote: >>> >>>> Hi All, >>>> >>>> I Know this question does not directly belongs to the list, but I >>>> though about asking here to get some clue.. >>>> >>>> I am trying to let user login through Google API but facing some >>>> issue,,I am able to get access_code but when I am trying to get >>>> access_token, I am getting HTTP Code 400 from Google and it saying >>>> >>>> OAuthProblemException{error='invalid_request', description='null', >>>> uri='null', state='null', scope='null', redirectUri='null', >>>> responseStatus=0, parameters={}} >>>> >>>> I tested it on Google OAuth 2.0 Playground and everything is working >>>> as expected but while using Oltu API, I am getting this exception >>>> >>>> But on other hand integration with Facebook just went smooth without >>>> any error/ exception. >>>> >>>> So anyone have idea what might be wrong here? >>>> >>>> -- >>>> With Regards >>>> Umesh Awasthi >>>> http://www.travellingrants.com/ >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Maciej Machulak >>> email: maciej.machu...@gmail.com >>> mobile: +44 7999 606 767 (UK) >>> mobile: +48 602 45 31 66 (PL) >>> >> >> >> >> -- >> With Regards >> Umesh Awasthi >> http://www.travellingrants.com/ >> >> >> > > > > -- > Maciej Machulak > email: maciej.machu...@gmail.com > mobile: +44 7999 606 767 (UK) > mobile: +48 602 45 31 66 (PL) > -- With Regards Umesh Awasthi http://www.travellingrants.com/