Post

1 follower Follow
0
Avatar

error in refresh_access_token ruby library

i am working with podio oauth tokens and am having issues getting a new access token. i am using the podio api ruby library. the code in question is here

http://pastebin.com/r0u72ysT

and the error that comes from the call to refresh the access token

Podio::InvalidGrantError ({"error_propagate"=>false, "error_parameters"=>{}, "error_detail"=>"oauth.grant.expired", "error_description"=>"Sorry, your OAuth grant has expired.", "error"=>"invalid_grant"}):

how can the grant have expired to the refresh token call?

Austin Martinez

Please sign in to leave a comment.

1 comment

0
Avatar

The most common cause of this problem is that the user has logged in again through your app, getting a new refresh_token, but you are still using the old one, which was expired when the new one was generated.

It's someone that's especially likely to happen when you are testing things out in development, frequently logging in and out without perhaps getting your sessions cleared.

The implementation in our Rails sample app might also help you, it relies on an Omniauth extension:

https://github.com/podio/podio_rails_sample

Casper Fabricius 0 votes
Comment actions Permalink