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

Heart Intraday TimeSeries 401 Error (Partner API)

ANSWERED

I'm getting an Unauthorized error only for the Heart TimeSeries. Does anyone know what could be wrong?

 

Here is the URL I'm requesting https://api.fitbit.com/1/user/-/activities/heart/date/2015-02-19/1d/1sec/time/07:00/10:20.json

 

HTTP/1.1 401 Unauthorized

 

{"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]}

 

Thanks for the new API endpoints!

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@derekm wrote:
Since FitBit OAuth 2 is in Beta (subject to change, not for production) would it be possible to temporarily allow the HeartRate endpoint to be accessed via OAuth 1.0a until OAuth 2 is out?

We're requiring applications to obtain explicit user consent to access heart rate and location data and that is only possible with OAuth 2.0.

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

Are you using OAuth 1.0a or OAuth 2.0? This only works with OAuth 2.0 and your app must have partner access for intraday data.

Best Answer
0 Votes

Ok, thank you, that must be the issue. 

 

Since FitBit OAuth 2 is in Beta (subject to change, not for production) would it be possible to temporarily allow the HeartRate endpoint to be accessed via OAuth 1.0a until OAuth 2 is out?

 

It might be good to put the reason either in the error message or make sure that the OAuth 2 requirement is noted in the announcements and in the Docs. 

Best Answer
0 Votes

@derekm wrote:
Since FitBit OAuth 2 is in Beta (subject to change, not for production) would it be possible to temporarily allow the HeartRate endpoint to be accessed via OAuth 1.0a until OAuth 2 is out?

We're requiring applications to obtain explicit user consent to access heart rate and location data and that is only possible with OAuth 2.0.

Best Answer
0 Votes