04-16-2016 07:26 - edited 04-16-2016 07:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-16-2016 07:26 - edited 04-16-2016 07:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
**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

04-16-2016 11:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-16-2016 11:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@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'.

04-16-2016 13:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-16-2016 13:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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

04-16-2016 14:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



04-16-2016 14:23
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@ljhardy Depending on the programming language or framework you're using, you should consult their documentation for adding HTTP headers.

