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

heart rate data not accessible

Hi,

   I'm writing a simple server code to access my profile data. I'm using OAuth 2 and when accessing the priofile with URL https://api.fitbit.com/1/user/-/profile.json, I'm getting profile data

But when I try to access heart rate information with url

https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1min/time/8:20/10:24.json

 

I'm getting this following error

{"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 have given permission to access the data to my application

 "Fitbit devices and settings, food and water logs, sleep, activity and exercise, weight, profile, location and GPS, heart rate, friends"

 

i might be doing some silly mistake. but couldn't lcoate

 

Thanks

Banuka

Best Answer
0 Votes
3 REPLIES 3

Hey @amilabanuka, welcome! Smiley Happy

 

If you private message me your OAuth 2 access token, I can check if it has the heart rate scope.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

Sorry for the delay. I finally found that we API permission from Fitbit is required to have an app as server application. for the moment I chaneged the app type as personal app type and now it works without any code change.

Best Answer
0 Votes

@amilabanuka No worries, glad to hear you're up and running.

 

Hope to see you around! Smiley Happy

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes