07-30-2022 16:23 - edited 07-30-2022 16:42
07-30-2022 16:23 - edited 07-30-2022 16:42
Hi All - I'm trying and failing to get oxygen saturation data through the web API.
I have authorized the oxygen_saturation scope (see screenshot below).
The app is designated as "Personal".
A request for heart rate data works fine. The URL looks like...
https://api.fitbit.com/1/user/-/activities/heart/date/2022-07-29/1d/1sec.json
A request for spo2 returns a 403 error with a message that says...
'API client is not authorized by Fitbit to access the resource requested. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.'
The spo2 request look like the one below, which seems to match the documentation.
https://api.fitbit.com/1/user/-/spo2/date/2022-07-29/all.json
Any thoughts on what is going on?
07-31-2022 14:41
07-31-2022 14:41
I am getting the same result using the OAuth 2.0 tutorial page to get tokens and the curl commands it provides to request data. Intraday heart rate works fine, spo2 doesn't work at all.
jwt.io reports that my token has the necessary scopes:
"iss": "Fitbit",
"typ": "access_token",
"scopes": "rsoc rset roxy rpro rnut rsle ract rloc rres rwei rhr rtem"
So it seems like the problem has to be on the Fitbit side of things.
08-01-2022 07:31
08-01-2022 07:31
I CAN get spo2 data with https://dev.fitbit.com/build/reference/web-api/explore/
This implies that my "Personal" app can not get this data even though according to https://dev.fitbit.com/build/reference/web-api/intraday/
A Fitbit developer’s personal Intraday data is automatically available through the “Personal” application type. You do not need to submit a request.
This further suggests the problem is on the Fitbit side of things.
08-02-2022 10:21
08-02-2022 10:21
I would also add that this seems to also be affecting the Breathing Rate Intraday API, I would also add that the Breathing Rate Summary API and SPO2 Summary API return exected responses across the same date ranges, validating scope and data range validity, but like you @mmcc73 I can access heart rate intraday just fine. My access is also set to "personal".
08-02-2022 12:09
08-02-2022 12:09
Someone I was communicating with in a different forum is also experiencing this. I suppose I'll have to figure out how to submit a real support ticket.
08-02-2022 17:02
08-02-2022 17:02
well glad to know that it isn't just me, was scratching my head for a bit on why this wouldn't work, hopefully this post and the other forum to which you have referred to get some others stating that this is affecting them and it gets some attention. If it isn't too much trouble can you drop a link to the other forum you are on so I can follow progress there as well?
08-02-2022 17:08
08-02-2022 17:08
It’s a thread in an issue for a python library for interacting with the api:
https://github.com/orcasgit/python-fitbit/issues/171
I also submitted a support ticket as it isn’t looking like anyone from Fitbit is paying attention to this thread.
08-02-2022 19:35
08-02-2022 19:35
Thanks for the link @mmcc73 for what it’s worth I built my own code for accessing the Fitbit api (using swagger-codegen) and im running into the same issue as you are with the python-fitbit package you are using. I think the same issues arising from two separate approaches provides some validity to your theory suggested in the link that this this is indeed something to do with the Web api permissions and not the python-fitbit codebase. Not fun that it is out of our hands but worth noting to help diagnosis issue and prevent unnecessary effort with the maintainers of the python-fitbit module
08-03-2022 06:12
08-03-2022 06:12
I heard back from Fitbit support, and...
We've identified an issue with the personal application setting for querying intraday data from the new endpoints (SpO2, HRV, and Breathing Rate). While it is intended for personal applications to fetch this data, it is currently not behaving as expected today.
We're working with engineering to resolve this as soon as possible. In the meantime, I recommend continued use of the Web API Explorer to pull the data from your account.
I'll post back here if I get any more info.
09-10-2022 11:20
09-10-2022 11:20
Here is a response from @Gordon-C on another thread: https://community.fitbit.com/t5/Web-API-Development/API-client-is-not-authorized-by-Fitbit-to-access....
09-14-2022 07:09
09-14-2022 07:09
Hi everyone,
We have fixed the problem where applications could not retrieve HRV and Breathing Rate intraday data for "personal" applications. We are still working on SpO2. We will update the community posts when SpO2 is available.
Gordon
12-27-2024 04:38 - edited 12-27-2024 04:46
12-27-2024 04:38 - edited 12-27-2024 04:46
May I ask is this function for SpO2 fixed? I face the same problem getting error
'fitbit.exceptions.HTTPForbidden: <Response [403]>'
when accessing Breathing Rate and SpO2 with
'https://api.fitbit.com/1/user/-/spo2/date/today/all.json' and 'https://api.fitbit.com/1/user/-/br/date/today/all.json'.
It works on HRV and other data (like activities and body).
The app is set as "Personal".