06-20-2016 22:03
06-20-2016 22:03
Hi all,
Having some issues with insufficient permissions when trying to get info from other accounts that aren't the account the app is hosted on. For example, when I try to do a get request to https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json using an access token from my account (the account that the app was created on), I'll get data back. If I try using my friend's account, I get back the error below:
{
"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
}
The authorization header follows the form 'Bearer {insert access token here}'. Any idea what might be going on? Thank you!
06-20-2016 22:11
06-20-2016 22:11
Your friend will need to authorize your app. Your app will need to use the access token for your friend in order for your app to access their data.
06-20-2016 22:21 - edited 06-20-2016 22:41
06-20-2016 22:21 - edited 06-20-2016 22:41
When they first log in, I successfully get their access token and the app shows up as authorized in the Application tab of their settings. Even with all of this, I still get the error that I have insufficient permissions.