05-16-2022 23:21
05-16-2022 23:21
Hello,
Context:
I have an application that uses OAuth2 to get the number of steps once a day.
The problem is:
At some point, we get an error while using the refresh token to get a new access token
{"errors":[{"errorType":"invalid_grant","message":"Refresh token invalid: 6e7......... Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}
How do we proceed:
- We're always getting the access_token and refresh_token successfully the first time.
- We successfully get the number of steps right after getting the first access token.
- The following day, we try with the old access token, and if the API response says that the access token is invalid, then we use the refresh token to get a new access token.
At this point, sometimes it works, and sometimes we get an error message saying "invalid refresh token".
A lot of weird things happen with this bug:
- It perfectly works on our dev environment (its the remote plateform for internal testers, not the local environment)
- It worked for a watch (linked to a fitbit application) but not for another one (linked to another fitbit application) on the staging environment. Both applications are configured exactly the same way.
If someone knows what happens here, some help would be much appreciated
Thanks
03-12-2023 20:47
03-12-2023 20:47
Yes, this is happening to my project too. Please give us enlightenment.