04-07-2020 10:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-07-2020 10:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
We no longer get notifications on data changes for some users, so I wanted to verify if the subscription for that user was still active.
I noticed the following error when performing a
GET https://api.fitbit.com/1/user/-/apiSubscriptions.json
{ "errors": [ { "errorType": "insufficient_scope", "message": "This application does not have permission to access nutrition data. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process." } ], "success": false }
What I expected to happen:
I believe this nutrition error is unrelated, and a call to the active apiSubscriptions should list subscriptions to sleep / activity if present, regardless of scope permission of nutrition.
Answered! Go to the Best Answer.

- Labels:
-
Subscriptions API
Accepted Solutions
04-16-2020 15:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-16-2020 15:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hey @Alegis,
Thanks for clarifying the scenario.
I can see that it is unusual for the endpoint to return this message based on one resource that the user did not consent to share when the endpoint is intended to return all active subscriptions for the user, but it appears that this is by design.
However, I will file a ticket for this endpoint to return only collections that the user has consented to share. I'll let you know when I get an update on this enhancement request.
Thanks again for spotting this, let me know if you have any other questions.
04-15-2020 15:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-15-2020 15:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @Alegis,
Welcome to the forums!
Have you checked to see if the user you are pulling data from has consented to the appropriate scopes during the authorization page? Also, verify that your authorization header is set to "Bearer".
Documentation: 403 Forbidden

04-15-2020 23:04 - edited 04-15-2020 23:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-15-2020 23:04 - edited 04-15-2020 23:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi John,
Thanks for replying! I can confirm the bearer was provided successfully and the user provided profile, sleep and activity permissions; but did not provide nutrition
That will cause a call to the general endpoint, get list of active subscriptions, to fail on the aforementioned error.
GET https://api.fitbit.com/1/user/-/apiSubscriptions.json
Is it possible to allow this call to return the apiSubscriptions to which the application does have permission; and not break on the error for an unrelated api subscription?
Kind regards,

04-16-2020 15:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-16-2020 15:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hey @Alegis,
Thanks for clarifying the scenario.
I can see that it is unusual for the endpoint to return this message based on one resource that the user did not consent to share when the endpoint is intended to return all active subscriptions for the user, but it appears that this is by design.
However, I will file a ticket for this endpoint to return only collections that the user has consented to share. I'll let you know when I get an update on this enhancement request.
Thanks again for spotting this, let me know if you have any other questions.
07-26-2021 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-26-2021 13:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi John, I am too experiencing this issue, and it appears to still be an open problem. Did you get anywhere with implementing a solution?
