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

BR and HVR denied access 403

Hi,
I am using Fitbit Inspire 2 and trying to fetch some data via WebApi.
My application type is "Personal" and at first attempt to authorize I gave an access to 'All' my data.
I am able to fetch everything(hr/steps/distance/calories) except:

  1. Breathing Rate Summary/Intraday.
    Request:
    https://api.fitbit.com/1/user/-/br/date/2022-06-11/all.json
    Error:
    This application does not have permission to READ RESPIRATORY_RATE data. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process.
    How can I request this permission? I have already shared 'All' data, haven't I?
  2. Heart Rate Variability intraday. (summary is possible to fetch)
    Request:

    Error:
    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.

    From the error message documentation:
    If you application type is “Personal”, then the owner of the application can only query their intraday data.
    But... I am trying to fetch my HRV intraday data. Why isn't it possible?

I would appreciate any help with it, thanks.

P.S. 'dailyRmssd' from HRV summary is called daily, but in the Fitbit App the same data are marked as 'nightly average'. Looks strange.

Best Answer
0 Votes
9 REPLIES 9

Hi @PlayerNotFound 

 

Just to confirm, when you consented to share all of your data with your application, did you see breathing rate and HRV listed in the available scopes page?

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Hi @Gordon-C 

No, there were no br and hrv in the listed scope page.
I have revoked access and here what it has suggested to share

PlayerNotFound_1-1655416454838.png

So.. if these options should be here, then it's a bit strange that they hadn't been listed.

Best Answer
0 Votes

Hi, I have same issue when fetch the breathing rate and SpO2. and I could not find the scope for spo2 and breathing rate in the list. Do you know what scope is for spo2 and breathing rate? 

Best Answer
0 Votes

You will need to add the breathing rate and SpO2 scopes to your authorization string.   This is not required for HRV because the data set access is part of the heart rate scope.   The documentation for the endpoints lists the scope you need to add at the top of the page.   See 

Breathing Rate: https://dev.fitbit.com/build/reference/web-api/breathing-rate/get-br-summary-by-date/
SpO2: https://dev.fitbit.com/build/reference/web-api/spo2/get-spo2-summary-by-date/

 

Once you add the scopes and send the user through the authorization flow again, you should see the 2 new scopes appear.  The user will need to consent to the new scopes before you can access the data.

 

Let me know if this doesn't work for you.

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer

Thanks Gordon, it worked 😊
By requesting /1/user/[user-id]/br/date/[date].json, the breathing rate is returned.
However, when requesting intraday data - /1/user/[user-id]/br/date/[date]/all.json, it returns the same error message as for hvr:
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.

Best Answer
0 Votes

Have you requested intraday access for this client ID?   If not, you have 2 choices

  1. You can change your application type to "personal" in your client ID settings at https://dev.fitbit.com
  2. You can request intraday access at https://dev.fitbit.com/build/reference/web-api/intraday/

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

No, I haven't because my application type initially was set to "personal"

PlayerNotFound_1-1655982481456.png

 

 

Best Answer
0 Votes

Thanks for clarifying.   I'm investigating the problem.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

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

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes