Goodreads Developers discussion

44 views
questions > Google Scripts + OAuth

Comments Showing 1-5 of 5 (5 new)    post a comment »
dateUp arrow    newest »

message 1: by Kent (new)

Kent Rasmussen | 4 comments Has anyone had success with getting OAuth to work inside Google Scripts? I'm trying to hook up Goodreads to a Google spreadsheet to help me organize some things.

I can get it working with Twitter no problem, but everytime I try to hook it up with Goodreads, when the OAuth redirects, I get "The state token is invalid or has expired. Please try again."

Does Goodreads use OAuth 1.0? 1.0a? Something else?

I'm working with this library: https://github.com/googlesamples/apps...


message 2: by Stephanie (new)

Stephanie | 9 comments Yes it uses oauth: https://www.goodreads.com/api/index#a...

In my app I'm using the oauth gem, having the user login with goodreads, and then storing the token in the session.

Did you register your app? Can you confirm that you are using the correct secret and key? Did you add the right auth endpoint for the redirect? That last one may be the issue, if you're in a spreadsheet I'm not sure what domain you would pass in.


message 3: by Kent (new)

Kent Rasmussen | 4 comments There's a special URL you can use for the redirect. I literally copied the redirect URL from what I have set up in my Goodreads API to the Twitter API, and Twitter worked fine.
If I remove the redirect URL, I get the message that I have already authenticated the app on the Goodreads website.
Is there a way to remove permissions I've granted to apps so I can try again? I tried regenerating the API key, but I get the same error.


message 4: by Kent (new)

Kent Rasmussen | 4 comments I've discovered that the URL returned from the redirect is malformed (there's two question marks in it).

https://github.com/googlesamples/apps...


message 5: by Stephanie (new)

Stephanie | 9 comments glad you figured it out!


back to top