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

Subscription: Can't add more than one subscription.

I can't add more than one subscription.  I'm attempted to add one per user.   For example:

POST http://api.fitbit.com/1/user/NNNNN1/apiSubscriptions/NNNNN1.json

POST http://api.fitbit.com/1/user/NNNNN2/apiSubscriptions/NNNNN2.json

The 2nd call gives me a 401.

 

Best Answer
0 Votes
2 REPLIES 2

Creating subscriptions requires that you use the user's access token and secret for the user whose data you are subscribing to. Otherwise, you will receive a 401 Unauthorized error.

Best Answer
0 Votes

You can only create subscription to user who had authorized your app to do so. 

 

As it specified in documentation you should just pass [-] instead of actual user id every time: https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API#FitbitSubscriptionsAPI-Addasubscription

 

 

Ivan Bahdanau
Senior Software Developer at Fitbit
Best Answer
0 Votes