11-12-2016 11:34
11-12-2016 11:34
Hello,
I'm trying to make a simple request on the API to get back heartrate scope.
I red API documentations and many subjects and the forum but i sill do not understand how to do it.
here where i am:
When i send the request i received the following message
{"errors":[{"errorType":"insufficient_scope","message":"This application does not have permission to access profile data. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}
i don't get it , i already gave this information in the step 2.2.6.
Any ideas?
Answered! Go to the Best Answer.
01-17-2017 08:10 - edited 01-17-2017 08:12
01-17-2017 08:10 - edited 01-17-2017 08:12
@dsalerne You're using your client ID when you should be using your user ID.
https://api.fitbit.com/1/user/2287Q3/activities/heart/date/today/1d/1sec.json
2287Q3 - this is your client ID.
See my post on how to get your user ID and use that instead.
@AndrewFitbit wrote:
@dsalerne Your userId is not on that page, it's at the end of the URL when you click "View Profile" from your dashboard settings (you can also navigate there by clicking your profile image at: https://www.fitbit.com)
11-12-2016 12:13
11-12-2016 12:13
@dsalerne The call you're making is to access profile data, not heart rate. You're only granting the heart rate scope, so you don't have permission to access anything else other than heart rate. This is why you get an "insufficient_scope" error when you make this call: https://api.fitbit.com/1/user/-/profile.json
The heart rate endpoints are listed in our API docs if you're trying to get heart rate data.
12-05-2016 15:51
12-05-2016 15:51
Hello,
My computer crashed and i lost whole my postman config.
I set like before, now with the good adress to get.
I get the token with authorization page, i give the authorization but when i try to request with this
https://api.fitbit.com/1/user/[MYUSERID]/activities/heart/date/today/1d/1sec.json
i received this message:
{"errors":[{"errorType":"insufficient_permissions","message":"API client is not authorized by the resource owner to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}
12-06-2016 13:03
12-06-2016 13:03
@dsalerne When you auth your app, you need to grant access to the heart rate scope to be able to access heart rate data.
12-07-2016 02:57
12-07-2016 02:57
Hello,
It seems to me i do so.
After setting app in devfitbit account and do my first request to get token i have the authorization popup with the description my application wants to access data on Hearrate ( selected). I select "Accept" but still have the error.
Is there an other step?
12-07-2016 08:59
12-07-2016 08:59
@dsalerne wrote:
https://api.fitbit.com/1/user/[MYUSERID]/activities/heart/date/today/1d/1sec.json
@dsalerne Are you substituting [MYUSERID] with "-" or with an actual user id? Because if you're inserting a user id of a user that did not auth your app, then that would be another reason why you would see the following error:
@dsalerne wrote:
{"errors":[{"errorType":"insufficient_permissions","message":"API client is not authorized by the resource owner to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}
12-08-2016 08:29
12-08-2016 08:29
Hello,
I'm submitting with my userId.
The one i got from "application | Registered"
01-13-2017 01:15
01-13-2017 01:15
Hello,
i still have the issue.
Any idea?
01-13-2017 09:06
01-13-2017 09:06
dsalerne wrote:I'm submitting with my userId.
The one i got from "application | Registered"
@dsalerne Your userId is not on that page, it's at the end of the URL when you click "View Profile" from your dashboard settings (you can also navigate there by clicking your profile image at: https://www.fitbit.com)
Can you show me the actual request you're trying to make, including what you're using for userId?
01-16-2017 00:19 - edited 01-16-2017 00:21
01-16-2017 00:19 - edited 01-16-2017 00:21
Hello,
I'm trying to request with this:
https://api.fitbit.com/1/user/2287Q3/activities/heart/date/today/1d/1sec.json
to be able the same data as your example
https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1sec.json{"activities-heart":[{"dateTime":"2017-01-16","value":{"customHeartRateZones":[],"heartRateZones":[{"max":93,"min":30,"name":"Out of Range"},{"max":130,"min":93,"name":"Fat Burn"},{"max":158,"min":130,"name":"Cardio"},{"max":220,"min":158,"name":"Peak"}]}}]}
Here are my setting concerning the request token
01-17-2017 08:10 - edited 01-17-2017 08:12
01-17-2017 08:10 - edited 01-17-2017 08:12
@dsalerne You're using your client ID when you should be using your user ID.
https://api.fitbit.com/1/user/2287Q3/activities/heart/date/today/1d/1sec.json
2287Q3 - this is your client ID.
See my post on how to get your user ID and use that instead.
@AndrewFitbit wrote:
@dsalerne Your userId is not on that page, it's at the end of the URL when you click "View Profile" from your dashboard settings (you can also navigate there by clicking your profile image at: https://www.fitbit.com)
03-02-2022 00:50
03-02-2022 00:50
Hi, I'm having trouble using someone else's user ID, can I ask you for advice?