10-26-2016 03:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-26-2016 03:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
We are trying to subscribe a set of users for a particular scope using
https://api.fitbit.com/1/user/-/[collection-path]/apiSubscriptions/[subscription-id].json
Sample subscription-id: https://api.fitbit.com/1/user/-/sleep/apiSubscriptions/ABC222222z9eba44a-44ff-4i2d-90d5-b5f124ce123f...
What we have observed is that the above request is failing saying "User is already subscribed to the stream" .After continous trial and error we observed that all requests where the subscription-id is greater than and equal to 32 are also failing.
All requests with a subscription-id length less than 32 are passing.
Our question is that is there a limit on the length of the subscription-id from fitbit?

- Labels:
-
Subscriptions API
10-26-2016 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-26-2016 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@GajulaKranthi What's the use-case for having 32 or more characters for a subscription-id? You might want to use the format {userId-collectionName} so it would look like this: https://api.fitbit.com/1/user/-/sleep/apiSubscriptions/3CKNFL-sleep.json
If you're getting a HTTP 409 Conflict error, it means the id of the subscription you've chosen has already been used by your application.

