Closed er1c closed 12 years ago
Thanks for the report. I'll take a look.
after I upgraded some oauth libraries I got a better error message
<HTML>
<HEAD>
<TITLE>Token invalid - AuthSub token has wrong scope</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Token invalid - AuthSub token has wrong scope</H1>
<H2>Error 401</H2>
</BODY>
</HTML>
Looks like its an issue on my end but maybe I'm confused on what scope I need to grab
"https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://spreadsheets.google.com/feeds"
I haven't tried but here's official document about the required scopes: https://developers.google.com/google-apps/documents-list/?hl=ja#authorizing_requests_with_oauth_20
I updated my scope to below and it works, should probably update the readme:
:scope: "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://docs.google.com/feeds https://docs.googleusercontent.com https://spreadsheets.google.com/feeds"
Done.
the session.spreadsheet_by_key will work with my OAuth2 token, but I get an error with session.files