Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

invalid grant and refresh token is invalid

Hi, I have called api to get access token using refresh token it give this response. I am not able to get new access and refresh token.

 

{
    "errors": [
        {
            "errorType""invalid_grant",
            "message""Refresh token invalid: 57daa97033762a1f5062015346e6c12d29a1ed63f31d251f025e51f9947f439b. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
        }
    ],
    "success"false
}
Best Answer
0 Votes
1 REPLY 1

Hi @Nithiyananth,

 

Welcome to the forums!

 

You're likely using an invalid refresh token. When your access token expires, your application should use the refresh token it obtained alongside the access token after the initial consent, to obtain a new access token and refresh token pair. Your application should store the new set of tokens and discard the older set of tokens to avoid encountering these errors.

 

Are you able to check your logs to see the new refresh token you should have saved after querying the token refresh endpoint? If you no longer have access to that refresh token, you'll need to revoke access to your application at https://www.fitbit.com/settings/applications then go through the authorization flow again to obtain a new set of tokens.

 

I hope this helps. Let me know if you have any additional questions.

Best Answer
0 Votes