Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

403 response - Error retrieving heart rate intraday data

ANSWERED

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?

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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.

View best answer in original post

Best Answer
6 REPLIES 6

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 Answer
0 Votes

Hi @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
0 Votes

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 Answer
0 Votes

Hi @GordonFitbit,

I just did it. Feel free to let me know if you need more actions from my side.

Best Answer
0 Votes

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.

Best Answer

It helps. Thanks a lot!

Best Answer
0 Votes