08-05-2014 13:30
08-05-2014 13:30
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.
08-05-2014 13:38
08-05-2014 13:38
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.
08-05-2014 13:44 - edited 08-05-2014 13:47
08-05-2014 13:44 - edited 08-05-2014 13:47
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