Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Getting Heart Intraday Data #241

Open
slamdunc64 opened this issue Mar 1, 2018 · 1 comment
Open

Trouble Getting Heart Intraday Data #241

slamdunc64 opened this issue Mar 1, 2018 · 1 comment

Comments

@slamdunc64
Copy link

I am trying to retrieve my own intraday heart rate data. The application is set to Personal. Do I still need to request access to this data through FitBit? Below is the code and results. Sorry for the basic question.
Code

var token = await helper.ExchangeAuthCodeForAccessTokenAsync(pin);
var fitbitClient = new FitbitClient(credentials, token);
var stats = await fitbitClient.GetActivitiesStatsAsync(); ---- Works! ----
Fitbit.Models.HeartRateResolution heartRateRes = new Fitbit.Models.HeartRateResolution();
var heart = await fitbitClient.GetHeartRateIntraday(DateTime.Today, heartRateRes); ---- Errors! ----

Call and Response

https://api.fitbit.com/1.1/user/-/activities/heart/date/2018-03-01/2018-03-01/15min/time/00:00:00/23:59:59.json
Response {StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent

@WestDiscGolf
Copy link
Contributor

@slamdunc64 Hi, You need to make sure you have requested the api end point to be made available to you. My understanding is this end point is quite intensive at the Fitbit end so isn't generally available.

From the post on their forum it still looks like a step which is required - https://community.fitbit.com/t5/Web-API-Development/Acess-Heart-Rate-Intraday-Time-Series/td-p/2326487/page/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants