Thank you Derik, I managed to track down my mistake. Indeed it was a problem with urlencoding. I am aware of Gdata API's, but I prefer to write all the code from scratch in order to better learn how oauth works. Thank you again for your help. Cheers,
.. BobBro On Mon, Aug 30, 2010 at 9:58 PM, DERICK LUNG'AHO LUNG'AHO F16/1778/2007 < [email protected]> wrote: > Does the result of your generated header match with that of the tool at the > website I mentioned? I mean at every step. I had the same problems with > signing requests to GData. > > Also, check whether you are urlencoding stuff twice... > > Also, have you tried the Gdata API's? they have OAuth stuff plus classes > for interacting with Google services..... > > Regards, > > Derick > > On Mon, Aug 30, 2010 at 5:50 PM, Robert Brozman > <[email protected]>wrote: > >> Hi and thanks for your reply. >> >> Unfortunately, while being a very useful tool for debugging, the link >> provided doesn't add up to the resulting "Authorization" header generated by >> Google's OAuth Playground. The result is still the same, every request is >> terminated with an "invalid token". >> >> Any ideas? >> >> Thanks, >> >> .. >> BobBro >> >> >> >> On Sun, Aug 29, 2010 at 4:12 PM, DERICK LUNG'AHO LUNG'AHO F16/1778/2007 < >> [email protected]> wrote: >> >>> Hi, >>> >>> Try this tool: >>> http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/ >>> >>> <http://hueniverse.com/2008/10/beginners-guide-to-oauth-part-iv-signing-requests/>and >>> compare its output with yours at every step. >>> >>> Regards, >>> Derick >>> >>> >>> On Sun, Aug 29, 2010 at 2:28 PM, Robert Brozman <[email protected] >>> > wrote: >>> >>>> Hi. >>>> >>>> my consumer key is set as anonymous because my application is not >>>> registered yet. I am following the steps I found here: >>>> http://code.google.com/apis/accounts/docs/OAuth_ref.html#SigningOAuth >>>> Please notice that the same kind of authentication using an anonymous >>>> consumer key results in a perfectly usable access token for the imap >>>> connection. >>>> >>>> Regards, >>>> >>>> BobBro >>>> >>>> >>>> >>>> On Sat, Aug 28, 2010 at 10:48 PM, Lasantha <[email protected]> wrote: >>>> >>>>> Why is your consumer key shows up as 'anonymous' ? >>>>> >>>>> On Thu, Aug 26, 2010 at 6:51 AM, Robert Brozman < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi, >>>>>> I'm fairly new to the world of Oauth and struggling to implement a >>>>>> oauth integration for a webservice. >>>>>> >>>>>> I managed to succesfully connect to imap with an authorized request >>>>>> token. However, for the application i'm building I need to know the user >>>>>> name of the gmail account that authenticated the connection. I know the >>>>>> solution lies here, >>>>>> http://sites.google.com/site/oauthgoog/Home/emaildisplayscope >>>>>> >>>>>> However all my tests in retrieving the username fails. I tried for >>>>>> instance using the oauth playground >>>>>> http://googlecodesamples.com/oauth_playground/ >>>>>> and all i could get was an "invalid token" reply. Clearly the scope >>>>>> selected for tests was " >>>>>> https://www.googleapis.com/auth/userinfo#email" >>>>>> >>>>>> Here's an example of my requests: >>>>>> >>>>>> GET /userinfo/email HTTP/1.1 >>>>>> Host: www.googleapis.com >>>>>> >>>>>> Accept: */* >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Authorization: OAuth oauth_version="1.0", >>>>>> oauth_nonce="b7467c66cede4ee8adba9ed37aa3f76a", >>>>>> oauth_timestamp="1282670504", oauth_consumer_key="anonymous", >>>>>> oauth_token="4%2FpkfNNkRJ10HGuN6vyx6ymN8euiqx", >>>>>> oauth_signature_method="HMAC-SHA1", >>>>>> oauth_signature="0XI8RXHHrSAAJC8J%2FBV6dLRDdR4%3D" >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Content-Type: text/csv >>>>>> GData-Version: 2.0 >>>>>> >>>>>> Can you spot what could be the problem? >>>>>> Thanks >>>>>> >>>>>> BobBro >>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "OAuth" group. >>>>>> To post to this group, send email to [email protected]. >>>>>> To unsubscribe from this group, send email to >>>>>> [email protected]<oauth%[email protected]> >>>>>> . >>>>>> For more options, visit this group at >>>>>> http://groups.google.com/group/oauth?hl=en. >>>>>> >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "OAuth" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]<oauth%[email protected]> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/oauth?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "OAuth" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<oauth%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/oauth?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "OAuth" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]<oauth%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/oauth?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "OAuth" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected] <oauth%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/oauth?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "OAuth" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] <oauth%[email protected]>. > For more options, visit this group at > http://groups.google.com/group/oauth?hl=en. > -- You received this message because you are subscribed to the Google Groups "OAuth" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/oauth?hl=en.
