01-12-2015 19:32
01-12-2015 19:32
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.
01-12-2015 20:17
01-12-2015 20:17
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.
01-12-2015 20:04
01-12-2015 20:04
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.
01-12-2015 20:11
01-12-2015 20:11
I am not adding that header. I am using the debug tool here: https://dev.fitbit.com/apps/oauthtutorialpage to generate the request.
01-12-2015 20:17
01-12-2015 20:17
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.
01-12-2015 20:18
01-12-2015 20:18
PM to me the id of your app:
https://dev.fitbit.com/apps/edit/<YOUR ID HERE>
01-13-2015 04:46
01-13-2015 04:46
Thank 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...
09-15-2015 03:12
09-15-2015 03:12
I have the same problem and I verified that am using the same key and secret .
09-15-2015 11:04
09-15-2015 11:04
@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.
01-31-2017 06:04
01-31-2017 06:04
Hi,
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
01-31-2017 08:16
01-31-2017 08:16
@LiorSharecare Did you properly configure/verify a subscriber?
01-31-2017 08:20
01-31-2017 08:20
Yes, I did
Verified at / Verification codeStats
1 https://***/fitbit/webHook | 2017-01-30T15:04:15.000Z | No Stats Available |
01-31-2017 09:59
01-31-2017 09:59
@LiorSharecare Are you passing the X-Fitbit-Subscriber-Id header parameter? If you're not, try doing that and specify 1 for subscriberId.
02-01-2017 01:18
02-01-2017 01:18
Yes, I've tried this as well and it returns:
"message": "Invalid parameter subscriberId: 1"
02-01-2017 12:42
02-01-2017 12:42
@LiorSharecare Okay thanks, just wanted to check. Can you PM your client ID to me?
02-13-2017 07:22
02-13-2017 07:22
Once I got the authentication process straight, it worked fine. thanks!
10-17-2019 03:56
10-17-2019 03:56
@AndrewFitbit @LiorSharecare I have the exact same problem. Could you please describe how you solved it?
Thank you,
S