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

Refresh token: "errorType":"invalid_grant","message":"Refresh token invalid

Hello! 
I am experiencing an issue where my Kafka streams data pipeline is returning an error of invalid grant on refreshing tokens.
We are handling the cases of refreshing the token and it is working perfectly for most of our users (almost half a million) user. However, we are facing the invalid_grant issue for some users and it starts to happen to around 1K users. 

I have read the suggested Article mentioned in the other answers: https://dev.fitbit.com/build/reference/web-api/developer-guide/best-practices/#Using-Tokens-Effectiv... 
But I still can't get the error that is happening from our side.

Here is the Client Id for the last two incidents: 5QRS8G, 3BJ68S

Thank you and best wishes, 
Khateeb 

Best Answer
0 Votes
3 REPLIES 3

Hi @khateeb 

 

I took a look at those 2 ids.   5QRS8G looks to be successfully refreshing tokens and pulling user data.  3BJ68S has no activity in the last several days.   Do you have an example where someone's refresh token began failing in the last 24-48 hours?

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Thank you for your Response 

Here are some other examples of users facing this issue in the past two days:  5J5W2R, 637MWJ, 39PDZG, 4C4CKS

I checked 5QRS8G and found that his connection was successfully refreshed and he hasn't started a new connection. how is that possible?  I believe if a user has an invalid refresh token error, the only way for him to fix it is by starting a new connection

Best Answer
0 Votes

Hi @khateeb 

 

My apologies for the delay.   It looks like the users 5J5W2R, 637MWJ, 39PDZG, and 5QRS8G are refreshing their tokens correctly with your application.  For the last user, I would ask them to reconsent to share their data with your application.   That should fix the refresh token problem.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes