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

Downloading personal data via Webapi/stuck on Oauth2.0

Morning all,

 

I'm interested in keeping track of my constant heartrate and daily exercises. I've heard I can get this data via the API. I've tried to use one of the community examples, but I'm stuck sadly.

 

I followed the steps of one of the options (https://shishuinfo.home.blog/2016/06/16/how-to-download-your-fitbit-second-level-data-without-coding...

but sadly, I do not get past step 2 of the OAUTH 2.0 Toturial Page (on dev.fitbit.com). When I fill in the data it shows: Token response does not match the expected format; please check that you're using the correct OAuth 2.0 flow.

 

Can someone help me with this part? Is this the easiest way to retrieve the exercise/HR data?

 

Thank you in advance!

 

Kind regards,

Marteijn

 
 
 
Best Answer
0 Votes
2 REPLIES 2

Hi @Marteijn,

 

Thanks for sharing information on what you're experiencing. 

 

Before I removed your screenshots, I saw that the error you were encountering was not shown and that you have properly copy/pasted the appropriate information to the parse response box.

 

The error (Token response does not match the expected format; please check that you're using the correct OAuth 2.0 flow.) typically appears if you are missing certain parameters or have copy/pasted the response incorrectly to the box.

 

It should look like this:

#access_token=<access_token>&user_id=<user_id>&scope=heartrate+profile+social+sleep+nutrition+location+settings+activity+weight&token_type=Bearer

 

Once you paste this into the parse response box, you should not see the error. From there, you can move to step 3 and enter the API request you'd like to execute (leave the access token field alone). Click "Copy to clipboard" to copy the request and paste it into your terminal/bash console to see the response.

 

Activity and HR endpoints can be found below:

Lastly, if you haven't already seen my private message, please check your inbox.

 

I hope this helps. Please let me know if you have any additional questions

Best Answer
0 Votes

I recently started trying to go through the same process. 

 

Just copy the entire URL into the box, don't try to cut only part of it across. 

 

I was hit by the same issue, if you cut from "scope" only then the key isn't there anymore - it's the first part returned.

 

Once you get to step 3 you can copy the content of the curl box (the white box) into a terminal window and get some basic info back. Then you'd need to start editing that to actually tap into the data you're looking for.

Best Answer
0 Votes