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

Can't seem to get Metric values back.

ANSWERED

On my test account all I can get is en_US. I've tried putting in the Accept-Language header with en_GB and nothing but all I get is en_US.

 

Any ideas?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

If you don't include an Accept-Language header, the API defaults to metric.

View best answer in original post

Best Answer
0 Votes
5 REPLIES 5

If you don't include an Accept-Language header, the API defaults to metric.

Best Answer
0 Votes

Super derp! I was confused by the user's en_US. Thanks!

Best Answer
0 Votes

Hello,

 

Sorry for asking a most basic question: how do I add the accept language heder for en-US in the script below (I'm a total novice, somehow got this to work, but now know no further):

 

Thanks a bunch!

 

[Moderator Edit: Please do not post large portions of code. Use a GitHub gist, Pastebin, or similar and link if necessary.]

Best Answer
0 Votes

@novikov: We are very happy to help you with issues related to the Fitbit API, but we're not here to debug your application. You should consult your programming language's or framework's documentation for adding HTTP headers.

Best Answer
0 Votes

For the Get Activity Type api, the documentation shows Accept-Locale instead of Accept-Language ...

 

        Accept-Locale optional The measurement unit system to use for response values.

 

This is different than in most places, where that is the description for Accept-Language, as in the doc for the 

Get Daily Activity Summary api where the doc shows:


        Accept-Locale optional The locale to use for response values.
        Accept-Language optional The measurement unit system to use for response values

 

Is this a typo in the docs? What is Accept-Locale supposed to do? I would expect it to localize text, not units of measurements.

Best Answer
0 Votes