Hi, I tried to get heart rate intraday data a couple of times by running "/1/user/GGNJL9/activities/heart/date/{date_str}/{date_str}/1min.json" but failed.
It returned {"errors":[{"errorType":"insufficient_permissions","message":"API client is not authorized by the resource owner to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}
I am sure my authorization included the “heartrate” scope (and any other necessary scopes) and the OAuth 2.0 Application Type is Personal. My OAuth 2.0 Client ID is 23Q4HS. Can you please help on this?
Answered! Go to the 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.
Looking in the logs, I can confirm you are calling the endpoint "/1/user/GGNJL9/activities/heart/date/{date_str}/{date_str}/1min.json". GGNJL9 is the sample user id we enter in the examples. This user hasn't consented to share their data with your application. This is the reason for the 403 error. Change "GGNJL9" to "-" and try your request again.
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 @YellowSky
Have you confirmed that the user's data you are trying to get are from the same user as the application owner?
Best AnswerHi @GordonFitbit,
Thank you for the reply. Yes, I am the application owner and trying to get the data on my Inspire 3. Both application and Inspire 3 is on my account. I am able to get the sleep data and the step taken data but not heart data.
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 @YellowSky
Would you please try to query the heart rate data again to reproduce the 403 error? I'll look into our logs to see if I can determine the problem.
Best AnswerHi @GordonFitbit,
I just did it. Feel free to let me know if you need more actions from my side.
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.
Looking in the logs, I can confirm you are calling the endpoint "/1/user/GGNJL9/activities/heart/date/{date_str}/{date_str}/1min.json". GGNJL9 is the sample user id we enter in the examples. This user hasn't consented to share their data with your application. This is the reason for the 403 error. Change "GGNJL9" to "-" and try your request again.