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

Not receiving subscription notifications for some users

ANSWERED

Hi,

 

We are using fitbit api in our app. We are not receiving subscription notifications for some users.

How do i solve this issue? 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions
  1. Confirm that Fitbit is able contact your subscriber endpoint. You can do this by clicking on the 'details' link by your subscriber list on your app details page.
  2. Confirm that your application actually does have active subscriptions for the users. You can do this by requesting the Get Subscriptions List endpoint.
  3. Check to see if the users have recently synced their device. You can do this by requesting the Get Devices endpoint and looking at the lastSyncTime value. If they're not syncing, you're not going to get notifications for them.
  4. Confirm that your application is processing all of the notifications inside a subscription notifications request. Remember that Fitbit can send multiple notifications inside of a single request.

If you confirm all of the above and are still having issues, contact private support with your client id and user ids. Be sure to include the results of the above.

View best answer in original post

Best Answer
0 Votes
7 REPLIES 7
  1. Confirm that Fitbit is able contact your subscriber endpoint. You can do this by clicking on the 'details' link by your subscriber list on your app details page.
  2. Confirm that your application actually does have active subscriptions for the users. You can do this by requesting the Get Subscriptions List endpoint.
  3. Check to see if the users have recently synced their device. You can do this by requesting the Get Devices endpoint and looking at the lastSyncTime value. If they're not syncing, you're not going to get notifications for them.
  4. Confirm that your application is processing all of the notifications inside a subscription notifications request. Remember that Fitbit can send multiple notifications inside of a single request.

If you confirm all of the above and are still having issues, contact private support with your client id and user ids. Be sure to include the results of the above.

Best Answer
0 Votes

Thank You

Best Answer
0 Votes

Hi,

 

When i tried to get the subscriptions for the users using GetSubscriptions endpoint its returning the values as null.

{
    "collectionType": "activities",
    "ownerId": null,
    "ownerType": null,
    "subscriberId": null,
    "subscriptionId": null
}

 

The user have recently synced their device and i can see data in their fitbit page. 

 

Best Answer
0 Votes

When i tried to add subscriptions to this user it returns me a 409 Conflict response.

When i tried to delete subscription it returns me response code as not found.

Best Answer
0 Votes

When i tried to get the subscriptions for the users using GetSubscriptions endpoint its returning the values as:

{"apiSubscriptions":[]}.

 

When i tried to add subscriptions to this user it returns me a 409 as response code.

When i tried to delete subscription it returns me response code as not found.

 

The user have recently synced their device and i can see data in their fitbit page. 

Best Answer
0 Votes

This is very odd! I think you may have created a subscription without a subscription id, which FItbit's API shouldn't allow. We're going to investigate this. Please private message me your client id.

 

In the interim, try doing this

  1. Have the user revoke your app's permission from their settings page. This will cause all of the subscriptions to this user from the app to be deleted.
  2. Have the user authorize your app again.
  3. Try to create a new subscription, being sure to specify a subscription name. It should look like this:
    POST https://api.fitbit.com/1/user/-/activities/apiSubscriptions/26FWFL-activities.json
    (The red text should be the name of the subscription for this user. It can be whatever you want, as long as it's unique.)
Best Answer
0 Votes

Please PM to me your:

1) Subscription id that you specify when you create subscription endpoint

2) application id

 

Best Answer
0 Votes