Hello
I have an application of Server Type.
For a few users, I am getting 403 on calling: https://api.fitbit.com/1/user/-/hrv/date/.../all.json
endpoint.
Response from FitBit:
API client is not authorized by Fitbit to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.
On the Fitbit DOCS the only recommendation that I found related to the above message is:
"If you application type is “Personal”, then the owner of the application can only query their intraday data."
So it can help me in the case when my app is server type.
The user has selected all scopes, (in fact it is my test user, so I have access to his account).
I found a related topic: https://community.fitbit.com/t5/Web-API-Development/Cannot-get-HRV-data-through-WebAPI/td-p/5187202
that says to reselect app type, but as I understand it will revoke all tokens, so clients will have to integrate once again.
It is not a certain solution and I will prefer to omit chaos
Thank for help
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.
Hi @PawelRoman
There could be several reasons that you're getting this error
Let me know if this does not solve the problem.
Gordon
Best AnswerThank you for your response
I am unable to find anything that might be related to "enabled the "Health Metrics" tile in their mobile application",
Are you able to provide me guide where it is?
Best regards
Best Answer
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.
The tile should appear in the mobile application on the main screen. Here's a picture of mine.
There is some additional information in this help article: https://help.fitbit.com/articles/en_US/Help_article/2462.htm
Best AnswerThank you,
A user have the "Health Metrics" enabled, so it is not that
Best Answer
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.
Hi @PawelRoman
Do you get the 403 error when you query the non-intraday endpoint? The syntax is https://api.fitbit.com/1/user/-/hrv/date/<date-value>/all.json
Best AnswerYes,
@Gordon-C
I am getting 403 error:
On calling endpoint: https://api.fitbit.com/1/user/-/hrv/date/<date-value>/all.json
Response: API client is not authorized by Fitbit to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process
Best Answer
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.
Hi @PawelRoman
My apologies. I gave you the incorrect endpoint. Please try https://api.fitbit.com/1/user/-/hrv/date/<date-value>.json. The "/all" should be removed to return the non-intraday data.
Thank you!
Gordon
Best Answer
Best Answer