10-14-2015 05:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-14-2015 05:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi
I am trying to get data from API using following code on safari (Authorization is successful), but the response said "This XML file does not appear to have any style information associated with it. The document tree is shown below." Does this mean there is something wrong with my code? I also tried the code on firefox, and it says "xml parsing error"...I really don't understand what is the problem.
https://api.fitbit.com/1/user/-/activities/heart/date/today/1d.json
(Authorization:.....)
Thanks for your help in advance.

10-15-2015 11:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



10-15-2015 11:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
How are you making this request?
It sounds like your browser is trying to treat the JSON response as XML. This would be a problem with your browser, not the Fitbit Web API.

10-18-2015 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-18-2015 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Jeremiah
Thanks for your suggestion.
I make request by sending the following url after I got the access token using Implicit Grant Flow
https://api.fitbit.com/1/user/[my-user-id]/activities/heart/date/today/1d.json Authorization: Bearer... access token)
But my safari and chrome returns only one line:This XML file does not appear to have any style information associated with it. The document tree is shown below.
And firefox says: XML Parsing Error: no element found
Location: http://api.fitbit.com/1/user/-/profile.json%20Authorization:%20Bearer%20eyJhbGciOiJIUzI1NiJ9.e.........
Line Number 1, Column 1:
There is no code or any other response appear on the page.
I have tried to install json view to my explore, but the error reminds. Also I checked the type of the page is text/xml. It would be really helpful if you could give me some more details to solve this problem.
Thank you

