11-13-2019 03:43 - edited 11-13-2019 03:58
11-13-2019 03:43 - edited 11-13-2019 03:58
Hey guys,
I'm currently using the fitbit API's oAuth method to request a new refresh code, which i can use in subsequent requests to the API on other methods.
On each of my calls to get information about the users steps or sleep, i am using this method to update both the refresh token and the access token in the database.
On the first, the insertion of the refresh and access token in the database is successful, and the call to get the steps of the user works. However once the call to get the sleep info runs, where the refresh token and access token are refreshed and updated in the database, a 400 bad request error is returned.
Any ideas on why?
Thank you
11-13-2019 11:16
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
11-13-2019 11:16
Hi @Rodrialves,
Welcome to the forums!
I recommend checking out our troubleshooting guide for solutions to common refresh token errors.
If the scenarios provided above don't fit the issue you are experiencing, please PM me your Client ID, the user id of the customer you were refreshing the token for, and the timestamps of when you were receiving the errors (within the last 7 days).
I hope this helps. Let me know if you have any additional questions.
11-30-2025 09:55
11-30-2025 09:55
Hi @JohnFitbit ,
I am encountering this issue too. Is it ok if i DM you the information you requested to help me see if i am running into the common errors you linked to (like reusing refresh tokens)? I checked my code and im not sure why i would hit any of them. If i can DM you, how do i do that lol.
Thanks,
Steven
Best Answer11-30-2025 21:51
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
11-30-2025 21:51
Hi @Stevenmz ,
You can share the details with us by submitting a ticket in the Issue Tracker: https://issuetracker.google.com/issues/new?component=1677887&template=2088063
You can also find the same link to the Issue Tracker for Fitbit Developer Support here: https://dev.fitbit.com/build/reference/web-api/help/
Best Answer