Open slamdunc64 opened 6 years ago
@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
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