01-27-2023 07:45
01-27-2023 07:45
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
01-27-2023 10:48
01-27-2023 10:48
Hi @PawelRoman
There could be several reasons that you're getting this error
Let me know if this does not solve the problem.
Gordon
01-31-2023 08:29
01-31-2023 08:29
Thank 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
01-31-2023 13:18
01-31-2023 13:18
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
02-02-2023 09:02
02-02-2023 09:02
Thank you,
A user have the "Health Metrics" enabled, so it is not that
02-02-2023 11:19
02-02-2023 11:19
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
02-03-2023 08:18
02-03-2023 08:18
Yes,
@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
02-03-2023 10:56
02-03-2023 10:56
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
02-13-2023 03:51 - edited 02-13-2023 03:52
02-13-2023 03:51 - edited 02-13-2023 03:52