01-08-2016 18:43
01-08-2016 18:43
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
01-12-2016 10:25
01-12-2016 10:25
Hey @amilabanuka, welcome!
If you private message me your OAuth 2 access token, I can check if it has the heart rate scope.
01-13-2016 05:05 - edited 01-13-2016 05:05
01-13-2016 05:05 - edited 01-13-2016 05:05
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.
01-13-2016 11:18
01-13-2016 11:18