Hi, I've just started using python-oauth2 lib this week. I was able to use the client to acquire the access token and access token secret and was also able to use them to retrieve emails through IMAP. However, when I tried to retrieve the email address (through https://www.googleapis.com/userinfo/email endpoint), I got an Invalid Header error from google. The scope that I passed in when getting the request token is
"https://mail.google.com/ https://www.googleapis.com/auth/userinfo#email" Here are the authorization header and base url GData-Version: 2.0 Host: www.googleapis.com Content-Type: application/atom+xml Authorization: OAuth oauth_version="1.0", oauth_nonce="67770302", oauth_timestamp="1303496854", oauth_consumer_key="anonymous", oauth_signature_method="HMAC-SHA1", oauth_token="1%2Fh5XE0YZJy4x49DeviJqNaHPdUvQsjI2ajIhilomOuI8", oauth_signature="K7A8Oz6pgQ%2BTKoAKniByLJaWBe0%3D"', Accept: */* https://www.googleapis.com/userinfo/email?oauth_body_hash=2jmj7l5rSw0yVb%2FvlWAYkK%2FYBwk%3D&oauth_nonce=67770302&oauth_timestamp=1303496854&oauth_consumer_key=anonymous&oauth_signature_method=HMAC-SHA1&oauth_version=1.0&oauth_token=1%2Fh5XE0YZJy4x49DeviJqNaHPdUvQsjI2ajIhilomOuI8 and the return values status: 401, x-xss-protection: 1; mode=block, x-content-type-options: nosniff, transfer-encoding: chunked, expires: Fri, 22 Apr 2011 18:27:35 GMT, server: GSE, cache-control: private, max-age=0, date: Fri, 22 Apr 2011 18:27:35 GMT, x-frame-options: SAMEORIGIN, content-type: text/html; charset=UTF-8, www-authenticate: AuthSub realm="https://gaiastaging.corp.google.com/ accounts/AuthSubRequest" invalid header I was another discussion on this group about making sure to avoid double urlencoding. I checked that too and it looks like everything is OK. Has anyone in this group used python-oauth2 lib and was successful at getting google email via https://www.googleapis.com/userinfo/email? Appreciate any help I can get. Regards, Chinh Tran -- 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.
