05-07-2015 10:24 - edited 05-07-2015 10:31
05-07-2015 10:24 - edited 05-07-2015 10:31
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!
Answered! Go to the Best Answer.
05-07-2015 10:46
05-07-2015 10:46
@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.
05-07-2015 10:35
05-07-2015 10:35
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.
05-07-2015 10:40 - edited 05-07-2015 10:41
05-07-2015 10:40 - edited 05-07-2015 10:41
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.
05-07-2015 10:46
05-07-2015 10:46
@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.