01-12-2015 19:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-12-2015 19:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

- Labels:
-
Subscriptions API
Accepted Solutions
01-12-2015 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-12-2015 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.
Senior Software Developer at Fitbit

01-12-2015 20:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-12-2015 20:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.
Senior Software Developer at Fitbit

01-12-2015 20:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-12-2015 20:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-12-2015 20:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.
Senior Software Developer at Fitbit

01-12-2015 20:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


01-12-2015 20:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
PM to me the id of your app:
https://dev.fitbit.com/apps/edit/<YOUR ID HERE>
Senior Software Developer at Fitbit

01-13-2015 04:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-13-2015 04:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-15-2015 03:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have the same problem and I verified that am using the same key and secret .

09-15-2015 11:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-15-2015 11:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-31-2017 06:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-31-2017 08:16
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@LiorSharecare Did you properly configure/verify a subscriber?

01-31-2017 08:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-31-2017 08:20
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



01-31-2017 09:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-01-2017 01:18
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes, I've tried this as well and it returns:
"message": "Invalid parameter subscriberId: 1"

02-01-2017 12:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



02-01-2017 12:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@LiorSharecare Okay thanks, just wanted to check. Can you PM your client ID to me?

02-13-2017 07:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-13-2017 07:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Once I got the authentication process straight, it worked fine. thanks!
10-17-2019 03:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-17-2019 03:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
@AndrewFitbit @LiorSharecare I have the exact same problem. Could you please describe how you solved it?
Thank you,
S
