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

403 error message when for activity calls

Hello,

 

We have an application that uses OAuth 2.0 to make API calls for step counts.  This application was working until about a week ago, when I started getting the following error message: 

 

Request failed for https://api.fitbit.com/1/user/-/profile.json returned code 403. Truncated server response: {"errors":[{"errorType":"insufficient_scope","message":"This application does not have permission to access profile data. Visit https://dev.fitbit.... (use muteHttpExceptions option to examine full response)  

From reading related discussion posts, it looks like the issue is that I am trying to make calls for the profile scope without permission.  However, I only need data from the activity scope, which is specified within my code.  Could you let me know if I'm on the right track, or how I can best proceed to get there?  Should I obtain permission for profile data, or can I bypass this and edit the application to only call for activity?  I'm happy to provide any information you need through private message.  Thanks!

Best Answer
0 Votes
5 REPLIES 5

@IRNAFLD1 wrote:

Hello,

 

We have an application that uses OAuth 2.0 to make API calls for step counts.  This application was working until about a week ago, when I started getting the following error message: 

 

Request failed for https://api.fitbit.com/1/user/-/profile.json returned code 403. Truncated server response: {"errors":[{"errorType":"insufficient_scope","message":"This application does not have permission to access profile data. Visit https://dev.fitbit.... (use muteHttpExceptions option to examine full response)  

From reading related discussion posts, it looks like the issue is that I am trying to make calls for the profile scope without permission.  However, I only need data from the activity scope, which is specified within my code.  Could you let me know if I'm on the right track, or how I can best proceed to get there?  Should I obtain permission for profile data, or can I bypass this and edit the application to only call for activity?  I'm happy to provide any information you need through private message.  Thanks!


If you dont need anything from the profile endpoint, then you can simply remove that call and avoid this altogether. Otherwise yes, you will need to request th profile scope.

Best Answer
0 Votes

Thanks for your help.  Please forgive me, but someone else wrote this code for us who is no longer here and I don't have much experience with .gs script.  Could you give me some advice as to how I might find the profile call in the code?  What would be the name of the function, or what are some key words I can look for specific to this action?

Best Answer
0 Votes

@IRNAFLD1 wrote:

Thanks for your help.  Please forgive me, but someone else wrote this code for us who is no longer here and I don't have much experience with .gs script.  Could you give me some advice as to how I might find the profile call in the code?  What would be the name of the function, or what are some key words I can look for specific to this action?


Try looking for the string "profile" or "profile.json" in the code.

Best Answer
0 Votes
Hi Dan,

Thank you for your help on this post both today and over the weekend. I
believe I understand why we are having issues and think it has arisen from
a misunderstanding regarding access to intraday activity data, which I am
willing to clarify. Would it be possible to get in contact personally with
someone in your department? Thanks.
Best Answer
0 Votes

Hi, in scope I request all scope but for me it always returns 403

 

Best Answer
0 Votes