oltu-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umesh Awasthi <umeshawas...@gmail.com>
Subject Re: Problem while getting access_token from Google
Date Mon, 06 Jan 2014 18:04:11 GMT
Thanks Maciej,

But honestly docs are not that clear (at-least for a beginner like me)..
I never paid much attention towards

1. buildBodyMessage()
2. buildHeaderMessage()
3. buildQueryMessage()

and followed example and that was my mistake nor this was clearly mentioned
in the docs.

Anyways thanks for the quick help as it solved my issue




On Mon, Jan 6, 2014 at 11:07 PM, Maciej Machulak
<maciej.machulak@gmail.com>wrote:

> Your code shows something different?
> It might be best if you provided the full code that you are using to
> exchange a code for an access token.
>
> Cheers, Maciej
>
>
> On 6 January 2014 17:33, Umesh Awasthi <umeshawasthi@gmail.com> wrote:
>
>> I am using that already :(
>>
>>
>> On Mon, Jan 6, 2014 at 11:01 PM, Maciej Machulak <
>> maciej.machulak@gmail.com> wrote:
>>
>>> Oh right, then use buildBodyMessage() :-) Sorry, my mistake
>>>
>>>
>>> On 6 January 2014 17:29, Umesh Awasthi <umeshawasthi@gmail.com> wrote:
>>>
>>>> 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.machulak@gmail.com> wrote:
>>>>
>>>>> Try using the buildPostMessage()
>>>>>
>>>>>
>>>>> On 6 January 2014 17:24, Umesh Awasthi <umeshawasthi@gmail.com>
wrote:
>>>>>
>>>>>> In All cases I am using buildQueryMessage()
>>>>>>
>>>>>>
>>>>>> On Mon, Jan 6, 2014 at 10:51 PM, Maciej Machulak <
>>>>>> maciej.machulak@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 <umeshawasthi@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.machulak@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.machulak@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.machulak@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.machulak@gmail.com
> mobile: +44 7999 606 767 (UK)
> mobile: +48 602 45 31 66 (PL)
>



-- 
With Regards
Umesh Awasthi
http://www.travellingrants.com/

Mime
View raw message