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
Community Moderator Alumni are previous members of the Moderation Team, which ensures conversations are friendly, factual, and on-topic. Moderators are here to answer questions, escalate bugs, and make sure your voice is heard by the larger Fitbit team. Learn more
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.
Best Answer