06-28-2022 16:52
06-28-2022 16:52
We are in the process of developing our first data collector. I am the "test user" . I have authorized fitbit to share data with our test server. We only receive notification events for activities and sleep. When I registered I clicked on Allow All
To test each morning I manually force the fitbit app on my iPhone to sync, then check the log files
I assumed that when ever data became available for an authorized scope fitbit would send us a notification event JSON with key "collectionType" set to the scope associated with the new data.
as a test any time we receive an 'activities' notification, I call the SpO2 and BreatingRate api and am able to get data. Clearly this is not going to work if the user has not authorized 'oxygen saturation' or 'breathing rate' scopes
I have not fully implemented apiSubscriptions. this is how I am currently forming the url
https://api.fitbit.com/1/user/xxxx/apiSubscriptions/xxxx-SubID-TODO.json
Any suggestions what my bug might be?
Kind regards
Andy
Answered! Go to the Best Answer.
06-29-2022 06:25
06-29-2022 06:25
Hi @aedwip
Breathing rate (BR), SpO2 and HRV do not support Subscription notifications (webhooks). BR, SpO2 and HRV are recorded during periods of sleep, not activity. If your application tracks sleep, then you can use the sleep notification arrival time to estimate when theBR, SpO2 and HRV data will be available. See the "Additional Information" section in the appropriate endpoint documentation. If you are not collecting sleep data, then I would recommend querying theBR, SpO2 and HRV data once or twice a day to see if data is available (e.g. 12 noon and midnight).
Gordon
06-29-2022 06:25
06-29-2022 06:25
Hi @aedwip
Breathing rate (BR), SpO2 and HRV do not support Subscription notifications (webhooks). BR, SpO2 and HRV are recorded during periods of sleep, not activity. If your application tracks sleep, then you can use the sleep notification arrival time to estimate when theBR, SpO2 and HRV data will be available. See the "Additional Information" section in the appropriate endpoint documentation. If you are not collecting sleep data, then I would recommend querying theBR, SpO2 and HRV data once or twice a day to see if data is available (e.g. 12 noon and midnight).
Gordon
06-29-2022 10:00
06-29-2022 10:00
Thanks Gordon
07-07-2022 13:47
07-07-2022 13:47
Hi Gordan
is there a list of which scopes have Subscription notifications (webhooks). I hard to go through all the documentation
Kind regards
Andy
07-07-2022 20:43
07-07-2022 20:43
The scopes are documented several places where we reference subscriptions. See if the Create Subscription endpoint page clarifies this for you.
07-08-2022 15:09
07-08-2022 15:09
Thank you