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

API client is not authorized by Fitbit to access the resource requested.

Dear All,

I would like to get Heart Rate Intraday Time Series for 1sec detail level.
Unfortunatelly, Im not able to get data. Please help me why I don't have permission for this query ?

Query:
1/user/-/activities/heart/date/today/today/1sec/time/00:00/23:59.json

This is the answer from WebAPI:

Array
(
    [errors] => Array
        (
            [0] => Array
                (
                    [errorType] => insufficient_permissions
                    [message] => API client is not authorized by Fitbit to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.
                )

        )

    [success] => 
)


Thank you in advance,
Dezso

Best Answer
0 Votes
1 REPLY 1

Did your user authorize the heart rate scope?

 

I tried this and it worked:

curl -X GET "https://api.fitbit.com/1/user/-/activities/heart/date/today/today/1sec/time/00:00/23:59.json" -H "accept: application/x-www-form-urlencoded" -H "authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI2SlA0VE4iLCJhdWQiOiIyMjdHNUwiLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJ3YWN0IHdociIsImV4cCI6MTUyMjM1MDM4MywiaWF0IjoxNTIyMjYzOTgzfQ.KIjAoACRX-5G3_8rtX_Eu-Qw6BKIlCMrEl_XfTxvbws"

Best Answer
0 Votes