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

Insufficient Permissions | 403 Error

ANSWERED

Hi ,

I am facing an issue where I have authorized the user with my application and currently I am trying to access my personal data only. I am only able to access user profile data i.e., 

 

https://api.fitbit.com/1/user/-/profile.json 

 

 I am not able to access following APIs :

 

https://api.fitbit.com/1.2/user/-/sleep/list.json?sort=asc&offset=0&limit=100
https://api.fitbit.com/1/user/-/activities/date/2021-10-19.json
https://api.fitbit.com/1/user/-/activities.json

The response I get is : 

[
{
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.'
}
]

I made sure that correct access token is passed.

My application is a server type.

 

Can anyone help me for this issue?

 

Thank You

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @GordonFitbit ,

Thanks for your quick response.

Seems like the authentication was done for some other user and not the one I was expecting. It's working now.

 

Thank You.

View best answer in original post

Best Answer
0 Votes
3 REPLIES 3

@JohnFitbit Can you help in this ? 

Best Answer
0 Votes

Hi @voliotDev 

 

In this scenario, the error "API client is not authorized by the resource owner to access the resource requested" typically means the access token you're using hasn't been authorized for activity and sleep.  The access tokens are in JWT format so you should be able to verify the scopes enabled within the token.   You can also send the user through the authorization flow again to have the user consent again.

 

If you try these things and still have problems, please let me know.   I'll need to get some information from you to investigate further.

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @GordonFitbit ,

Thanks for your quick response.

Seems like the authentication was done for some other user and not the one I was expecting. It's working now.

 

Thank You.

Best Answer
0 Votes