AnsweredAssumed Answered

Why does the API return 'invalid_grant' before my access token has expired?

Question asked by Maritn Hawes on Oct 13, 2017
Latest reply on Oct 13, 2017 by Zachary Allin

Hello,

 

I have an external application which talks to sugar using the rest API. It asks for an access token and stores it along with the refresh token. When the access token expiry is nearing it uses the refresh token to ensure we don't end up with an invalid token. 

 

I am getting an 'invalid_grant' response with the message 'The access token provided is invalid' quite frequently (once every ~120 requests). This mean my application has to request a new access token every few minutes in the worst case, which is clearly not right. 

 

 

Has anybody got any advice or have had this issue before?

 

Thanks very much! 

Martin

Outcomes