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

Subscription API in Android Application Integration

What is a subscription Id? 

How is it generated? 

Is it from server end or from App side? 

Should user has to enable subscription in their profile?

I tried POST https://api.fitbit.com/1/user/-/apiSubscriptions/320.json?subscriberId=320

{"errors":[{"errorType":"validation","fieldName":"subscriberId","message":"Invalid parameter subscriberId: 320"}]}

 

Kindly give me solution for the above questions other than from https://dev.fitbit.com/docs/subscriptions/.

Thanks in advance.

Best Answer
0 Votes
1 REPLY 1

@Sowmiya

Is there something that needs to be clarified from the docs? I would encourage you to read the "Adding a Subscription" section of the docs for the above questions.

 


Sowmiya wrote:

I tried POST https://api.fitbit.com/1/user/-/apiSubscriptions/320.json?subscriberId=320

{"errors":[{"errorType":"validation","fieldName":"subscriberId","message":"Invalid parameter subscriberId: 320"}]}

 


1. You're adding a parameter at the end, it should just be:
https://api.fitbit.com/1/user/-/apiSubscriptions/320.json

 

If you're trying to use a specific subscriberId, then use the optional header X-Fitbit-Subscriber-Id.

 

2. If you haven't already, you would need to configure a subscriber before you're able to add a subscription.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes