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

I want to output the heart rate by time.

It is possible to output the heart rate on a daily basis, but it is not possible to output the heart rate on a timed basis.

 

For example, it could look like this

curl -i -H "Authorization: Bearer <access token>"   https://api.fitbit.com/1/user/-/activities/heart/date/2021-01-06/1d/1sec/time/15:00/15:05.json)

 

Result

{"errors":[{"errorType":"insufficient_permissions","message":"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."}],"success":false}

 

I'd like you to tell me what I'm doing wrong.

Best Answer
0 Votes
2 REPLIES 2

Have you got intra-day access?

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hi @kotaronislab 

 

Please don't post access tokens in the public forum.   If a token is required, we will request it through a safe means.   It looks like you are trying to query the intraday heart rate data.   If you're querying your heart rate data, then set the application type = "personal".  If you need other Fitbit user's heart rate data, you'll need to request access to the Intraday data here: https://dev.fitbit.com/build/reference/web-api/intraday-requests/.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes