06-28-2022 16:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-28-2022 16:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
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.

- Labels:
-
Subscriptions API
Accepted Solutions
06-29-2022 06:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-29-2022 06:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

06-29-2022 06:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



06-29-2022 06:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

06-29-2022 10:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-29-2022 10:00
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks Gordon

07-07-2022 13:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-07-2022 13:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



07-07-2022 20:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The scopes are documented several places where we reference subscriptions. See if the Create Subscription endpoint page clarifies this for you.
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

07-08-2022 15:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

07-08-2022 15:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you

