05-06-2022 03:02
05-06-2022 03:02
Hello,
I have successfully integrated the Subscriber API into my web application, but now what I am seeing is a notification every 15 minutes, despite the ONE user that we have beta testing this being asleep. The only scope for the subscription is activity, yet each call to pull down activity data that we make AFTER the notification is blank.
Why is this? What is going on? We are using a serverless backend, so we are doomed if we try to scale.
05-06-2022 08:52
05-06-2022 08:52
Hi @jwindle
There are a couple of things going on here that explains why you are receiving activity notifications. When the user is wearing their device and is near their mobile device with the Fitbit application running in the background, the device and mobile application automatically sync every 15 minutes. Whenever new data is detected, we send your subscriber a notification. So, where is this new activity data coming from? Activity data does not just include steps or recorded activities. Activity also includes calories. A person is always burning calories even while they are sleeping. What you're probably seeing is a change in the calories burned while the user is sleeping. To verify if this is occurring, try calling the Get Activity Time Series endpoint using the "calories" resource to see if the that value is changing every 15 minutes. See https://dev.fitbit.com/build/reference/web-api/activity-timeseries/get-activity-timeseries-by-date/