I am trying to create an apiSubscription, using the docs here: https://wiki.fitbit.com/display/API/Fitbit+Subscriptions+API
I have created a default subscription endpoint in the app management page.
Using the API Debug tool, here: https://dev.fitbit.com/apps/oauthtutorialpage I enter an access token, access token secret, this url: https://api.fitbit.com/1/user/-/apiSubscriptions/1.json, a nonce, refesh the typestamp, and change the type to POST. When I execute the generated request (both on my command line, and through Hurl), I get the following response:
{"errors": [{"errorType": "validation","fieldName": "subscriberId","message": "Invalid parameter subscriberId: null"}]}
Any help would be appreciated.
Answered! Go to the Best Answer.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Can you please verify that the consumer key you making request with has is the same one that is on application you added the subscription endpoint.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Are you passing X-Fitbit-Subscriber-Id header parameter?
If yes, please check that the id is the same as you have it on app management page.
If you don't pass X-Fitbit-Subscriber-Id the api call will automatically subscribe to the default subscriber.
Also try not to pass X-Fitbit-Subscriber-Id parameter and see if it's helps.
Best AnswerI am not adding that header. I am using the debug tool here: https://dev.fitbit.com/apps/oauthtutorialpage to generate the request.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Can you please verify that the consumer key you making request with has is the same one that is on application you added the subscription endpoint.
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
PM to me the id of your app:
https://dev.fitbit.com/apps/edit/<YOUR ID HERE>
Best AnswerThank you. The problem was, as you suggested, I was using the wrong Consumer Key. 100% my fault. I'll go wash the egg off my face now...
Best AnswerI have the same problem and I verified that am using the same key and secret .
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
@hybridTech wrote:
I have the same problem and I verified that am using the same key and secret .
Please share the HTTP request you're making (obscuring your app secrets) and the response you're receiving.
Best AnswerHi,
I'm sending this request:
POST /1/user/-/apiSubscriptions/user1.json
and I'm getting:
"message": "Invalid parameter subscriberId: null
From what I've read in the API doc the default subscriber should be automatically used, but it seems like this doesn't work for me.
Thanks,
Lior
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
Yes, I did
Verified at / Verification codeStats
1 https://***/fitbit/webHook | 2017-01-30T15:04:15.000Z | No Stats Available |
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
@LiorSharecare Are you passing the X-Fitbit-Subscriber-Id header parameter? If you're not, try doing that and specify 1 for subscriberId.
Best AnswerYes, I've tried this as well and it returns:
"message": "Invalid parameter subscriberId: 1"
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
Once I got the authentication process straight, it worked fine. thanks!
@AndrewFitbit @LiorSharecare I have the exact same problem. Could you please describe how you solved it?
Thank you,
S