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

Discrepancy between Dashboard and API for total miles

**DISREGARD THIS QUESTION, the api is returning kilometers**

 

Here is my dashboard from 4/15, showing 11,711 total steps and 5.76 total miles.  The API for the same day shows the same number of steps:

 

            [steps] => 11711

 

but the total miles are way inflated:

 

[distances] => Array
(
[0] => Array
(
[activity] => total
[distance] => 9.26
)

[1] => Array
(
[activity] => tracker
[distance] => 9.26
)

 

Any thoughts on why this is??

 

Thanks, Len

 

image1.PNG

Best Answer
0 Votes
3 REPLIES 3

@ljhardy Glad you figured it out.

 

If you want the API to return distance in miles, you'll have to include the Accept-Language header and set it to 'en_US'. Robot Happy

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes

Thanks Andrew - I'm sure this should be easy, but I'm struggling a little bit with it.  Do I set this header when I authenticate, or when I request the data?


Thanks, Len

Best Answer
0 Votes

@ljhardy Depending on the programming language or framework you're using, you should consult their documentation for adding HTTP headers.

Andrew | Community Moderator, Fitbit

What motivates you?

Best Answer
0 Votes