08-08-2015 17:27
08-08-2015 17:27
I'm working on a presentation application for a conference monday, and Im getting a 401 not authorized (which is a weird result, shouldn't it be 403?) from the heartrate endpoint. Help?
https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json { statusCode: 401, data: '{"errors":[{"errorType":"request","fieldName":"n/a","message":"API client is not authorized to access the resource requested."}]}' }
08-08-2015 17:50
08-08-2015 17:50
Are you using OAuth 2.0? Did you ask for heart rate scope?
08-08-2015 17:52
08-08-2015 17:52
I'm using your sample code from the twilio demo (with more pieces).
Does it only work with OAuth 2.0? If so, could the docs be updated to indicate that? Not sure if I have time to update the OAuth to 2.0.
K
08-09-2015 09:16
08-09-2015 09:16
I'm looking at updating to OAuth2, using the passport-fitbit-oauth2 library, but the example seems incomplete. It shows how to do the authentication dance, but doesn't show (anywhere) how to make an actual authenticated call. Passport in 1.0a needed a separate oauth library call to make an authenticated call to a resource. I've scoured all the usual places and haven't found any examples of how to take the token and make a call out of it using a library.
Does anyone have an example of doing this in node?
Thanks,
Kirsten