function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
lucasminissalelucasminissale 

Can't refresh the access token. The response comes with the old access token

Hi,

According to this: http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com , once I get the 401 error ('Session expired or invalid'), I should be able to use the refresh token to obtain a new access token.

 

However, anytime I attempt to refresh the token, the response comes without error messages, but with the same old access token that is expired or invalid.

 

 

How can that be possible ? Isn't it supposed to return a new access token ?

 

Thanks!

jlcoverityjlcoverity

What oauth scope are you using?

lucasminissalelucasminissale

Scopes:

 

Access and manage yout data (api)

perform requests on your behalf at any time (refresh_token)  

lucasminissalelucasminissale

I just realized that my real problem is that the API is returning the error "Session invalid or expired" kind of randomly. Even if the session is not really expired. That's why the response comes with the same old token when I try to refresh. It's super weird.