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
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more
Hey @amilabanuka, welcome! ![]()
If you private message me your OAuth 2 access token, I can check if it has the heart rate scope.
Best AnswerSorry 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
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more