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

Invalid refreshtoken

Hello,

 

We perform multiple requests for customers with fitbit sensors in batches. Sometimes for a number of people in the batch we receive the notification that the refreshtoken is invalid. We cannot find a reason for this and most requests are OK. 

 

What could be the reason we receive an invalid refreshtoken response for some users?

 

Thanks in advance

HUSS

Best Answer
0 Votes
3 REPLIES 3

A refresh token request will fail if:

  • The application's authorization has been revoked by the user or the app itself.
  • Your app has already used the refresh token. Refresh tokens may only be used once. A new refresh token will be returned with the new access token. (There is a 2 minute "grace period" that starts at the time of the first request with a refresh token. If subsequent identical refresh token requests are made during this period, Fitbit will respond with the same new access and refresh tokens. This helps apps be resilient to network issues and issues related to concurrency.)
Best Answer
0 Votes

Thank you for your response. Your points are clear but this is probably not the reason these requests fail. Whe currently have a number of fitbit userid's of failed requests. Is there any way you can detect what is going on when we provide you with this userid's?

 

Thanks in advance

Best Answer
0 Votes

@HUSSDev wrote:

Your points are clear but this is probably not the reason these requests fail.


Please contact private support with your client id and your application logs of refresh token request failures that include user id, timestamp, and the refresh token. You'll need to send this information to Fitbit within 24 hours of the failure in order for Fitbit to investigate.

Best Answer
0 Votes