09-14-2015 17:16
09-14-2015 17:16
Exception: Request failed for https://api.fitbit.com/1/user/-/activities/heart/date/2015-09-07/1d/1sec/time/00:00/23:59.json returned code 401. Truncated server response: {"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]} (use muteHttpExceptions option to examine full response)
I am using the script from https://github.com/simonbromberg/googlefitbit and modified to get heart rate data according to the instruction. The code seems to be using Auth 2.0 and I am setting the scope for heartrate. Any idea what I might be doing wrong?
Thanks in adv.
Answered! Go to the Best Answer.
Best Answer09-15-2015 12:21
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-15-2015 12:21
From the OAuth 2.0 access token you sent me, I confirmed that the access token did not contain permission for heart rate. You need to request the 'heartrate' scope in the authorization flow. See https://dev.fitbit.com/docs/oauth2/#scope
Best Answer09-15-2015 17:23
09-15-2015 17:23
@JeremiahFitbit wrote:From the OAuth 2.0 access token you sent me, I confirmed that the access token did not contain permission for heart rate. You need to request the 'heartrate' scope in the authorization flow. See https://dev.fitbit.com/docs/oauth2/#scope
Thanks for the help. It turned out that I didn't reset/reauthorize after changing the scope etc for the heart rate data.
Best Answer09-14-2015 17:35
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-14-2015 17:35
Sounds like you're using OAuth 1.0a. Maybe you should open an issue with that project.
Best Answer09-15-2015 11:25
09-15-2015 11:25
@JeremiahFitbit wrote:Sounds like you're using OAuth 1.0a. Maybe you should open an issue with that project.
Any particular reason you say that? I'm using Google's OAuth2 library (version 17). And from what I can glean from the code, it is making OAuth2.createService() calls to get Fitbit service.
Best Answer09-15-2015 11:32
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-15-2015 11:32
Private message me your OAuth 2 access token and I can tell you if it has the heart rate scope.
Best Answer09-15-2015 12:21
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
09-15-2015 12:21
From the OAuth 2.0 access token you sent me, I confirmed that the access token did not contain permission for heart rate. You need to request the 'heartrate' scope in the authorization flow. See https://dev.fitbit.com/docs/oauth2/#scope
Best Answer09-15-2015 17:23
09-15-2015 17:23
@JeremiahFitbit wrote:From the OAuth 2.0 access token you sent me, I confirmed that the access token did not contain permission for heart rate. You need to request the 'heartrate' scope in the authorization flow. See https://dev.fitbit.com/docs/oauth2/#scope
Thanks for the help. It turned out that I didn't reset/reauthorize after changing the scope etc for the heart rate data.
Best Answer01-13-2016 21:15
01-13-2016 21:15
how do I connect OAuth 2.0 ? how to access?
Best Answer01-13-2016 21:27
01-13-2016 21:27
I'd like to get hearrate date from the fitbit
but problem is I can not authorize to get permission from fitbit.
How do I use OAuth2.0 ?
if possible please let me know about it. have a great day and Thanks and Best wishes
-Woong-
Best Answer