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

Chracter limit on subscription-id when registering for notification.

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?

 

Best Answer
0 Votes
1 REPLY 1

@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.

 

 

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes