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

Issue with subscription and sleep registries.

Hello.

I have an app that let users connect their fitbit account. We then create a subscription for sleep data in order to get that information. It works well mos of the time. 

But we are having some issues where we dont get any subscription. I've start testing with a user and event when the sleep data exists on fitbit y doesn't appear it has been sent to our subscription. 

I've checked the subscription in case it didn't exists and it is there but we haven't received any new notification yet. 

Has anyone steped with an issue like this. I'm not sure where to look as i've already confirmed the data exists on fitbit. And the subscriptions are there for the user. 

Thanks.

Best Answer
0 Votes
2 REPLIES 2

Hi @rumeau 

Thanks for reaching out and sharing your question! 

Based on your description (sleep data exists, subscription is active, but no notification received), the most common cause is an issue with how your server acknowledges the notification. As our official Subscriptions documentation explains, your endpoint must respond to the POST notification with an HTTP 204 No Content within 5 seconds. If it sends a 200 OK, or times out, our system will stop sending notifications to that endpoint. This matches what you're seeing, as the subscription itself will still appear active. For initial troubleshooting, can you check your server's access logs for the incoming POST request from Fitbit for that specific user and date. Verify the HTTP status code your server sent in response. This will likely reveal if it was something other than a 204.

If your logs show you are correctly sending a 204 but still not receiving notifications, we will need to investigate on our end. To do so, please provide the following details in a private ticket via Issue Tracker:

  • User ID

  • Client ID
  • Subscription ID: (The specific ID for this user's sleep subscription)
  • Date and Time: The exact date and approximate time of the sleep sync that did not send a notification.

Thanks!

Best Answer
0 Votes

Hey mate, I have run into that exact issue before while integrating Fitbit sleep data into an app. Sometimes the webhook doesn’t trigger even though the subscription looks active. When I was working on a Nebroo project, we fixed it by revalidating the callback URL and refreshing the user’s access token. Try that it usually gets the notifications flowing again.

Best Answer
0 Votes