Issues with OAuth 2.0 Library for Google Apps Scripts

956 views
Skip to first unread message

Jason Morris

unread,
Apr 3, 2015, 8:27:56 PM4/3/15
to clio-de...@googlegroups.com
I'm attempting to use the library and instructions referred to here


to connect to Clio from a google apps script.

I'm getting as far as getting to the Clio authorization page, where I can click to say "yes, authorize" but I'm immediately getting an error message back:

"The state token is invalid or has expired. Please try again."

The state token is being generated by the library, which uses the token builder library here: https://developers.google.com/apps-script/reference/script/state-token-builder

I'm a little out of my depth, here, so not even sure where to go next.  Any help would be appreciated.

I'm also eventually going to want to be able to run the app without user intervention, and have it remember the authorization it receives so it can keep making requests.  But for development purposes I'm willing to solve one problem at a time. :)

Jason Morris

unread,
Apr 3, 2015, 8:47:32 PM4/3/15
to clio-de...@googlegroups.com
OK, that problem is resolved.  I had moved the script from an old-style Google Sheets script to a new-style Google Sheets script without updating the project ID.

The new problem is that I am getting a response Error: Invalid Client at line 246 of https://github.com/googlesamples/apps-script-oauth2/blob/ref/heads/master/Service.gs

Anyone have any advice on how I can move forward from there?

Thanks,

Jason

Vinod Kumar Gubbala

unread,
May 26, 2015, 2:42:41 AM5/26/15
to clio-de...@googlegroups.com
What do you mean by old style Google sheets to new style google sheets. Can you help me in understanding it...

Bill Blewett

unread,
May 28, 2015, 2:53:41 PM5/28/15
to clio-de...@googlegroups.com
See this for some of the changes in "New Style" sheets: https://developers.google.com/apps-script/migration/sheets
Reply all
Reply to author
Forward
0 new messages