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

Not able to access HR Intraday/specifc day data using API Calls.

ANSWERED

Hi,

 

I am using the following API call to access the HR minute/second data:

 

GET https://api.fitbit.com/1/user/-/activities/heart/date/2015-9-5/1d/1sec/time/00:00/23:59.json

 

but in response i am getting some junk data like the one provided below.

 

"Fishing from river bank, standing\"},{\"accessLevel\":\"PUBLIC\",\"hasSpeed\":false,\"id\":4050,\"mets\":6,\"name\":\"Fishing in stream, in waders\"},{\"accessLevel\":\"PUBLIC\",\"hasSpeed\":false,\"id\":4060,\"mets\":2,\"name\":\"Fishing, ice, sitting\"},{\"accessLevel\":\"PUBLIC\",\"hasSpeed\":false,\"id\":4100,\"mets\":5,\"name\":\"Hunting\"},{\"accessLevel\":\"PUBLIC\",\"hasSpeed\":false,\"id\":4070,\"mets\":2.5,\"name\":\"Hunting, bow and arrow ...................

 

Can someone please help me what am i doing wrong?

 

I am using .NET and able to authenticate using OAuth2.0.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

@sharmakbkm: You're not using a valid date format, with two digit month and day. Your link should be:

https://api.fitbit.com/1/user/-/activities/heart/date/2015-09-05/1d/1sec/time/00:00/23:59.json

View best answer in original post

Best Answer
0 Votes
6 REPLIES 6

Hi,

I believe they have a problem with their DB or there services, I saw another ppl reporting the same issue and I got the same junk data for intraday HR when I tried to retrieve for a specific interval , few months ago I wrote to them but they didn't replay  and I didn't find any solution. The only idea which I had it was to request day by day but I got suspended for 5 minutes , to many calls , and after that I gave up trying. Maybe later I will try again with a timer between calls but is not a solution ....

Best Answer
0 Votes

@sharmakbkm: You're not using a valid date format, with two digit month and day. Your link should be:

https://api.fitbit.com/1/user/-/activities/heart/date/2015-09-05/1d/1sec/time/00:00/23:59.json
Best Answer
0 Votes

@catalind: There is no problem with Fitbit's database. The API response above is a result of a route confusion due to an incorrect URL request from the client.

 

Intraday data has a max of 24 hours per request. The hourly rate limit is described here.

Best Answer
0 Votes

 @JeremiahFitbit   this end point : "GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json " wich specify a start date  [date] and a [end-date]  this end poit is saying  nothing about 24h interval 

I will try to find exactly the of code wich I used and send to you the call .

And in my oppinion  if the call it was wrong the end point should returnn a error message 

Aslo may I sent to you a privat message ?

Thank you

Best Answer
0 Votes

@catalind wrote:

 @JeremiahFitbit  

And in my oppinion  if the call it was wrong the end point should returnn a error message


I agree and in most cases in the Fitbit API, you will. Due to the complexities of this particular URL structure, this is complicated and results in a different endpoint being requested instead. It's something I hope Fitbit can fix in the future.

 


@catalind wrote:

Aslo may I sent to you a privat message ?


If you need private support, please use the form at https://dev.fitbit.com/docs/help/ .

Best Answer
0 Votes

@JeremiahFitbit Thank you for your answer , I have use that form many time and I didn't get any respons back,it's like sending the request in void , pls read my last posts here in the forum,  realy I would like to be able to speak with some one directly 

Again thank you for your help and cooperation

Best Answer
0 Votes