- « Previous
-
- 1
- 2
- Next »
03-20-2016 08:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-20-2016 08:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I wrote up my experience getting intraday time series heart rate data from the Fitbit API.
https://tomhummel.com/2016/03/19/fitbit-heart-rate/
Sorry if this is not the right venue for this.
03-23-2016 05:23 - edited 03-23-2016 05:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 05:23 - edited 03-23-2016 05:39
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks Tom
I did use the -n. I went ahead and just put it all into the script now and posted it into Github. I create the ssl key on the fly now. I can create variables for the keys as well, which I'll do later.
If you put your bits/keys in that script and it works, then it's an environmental issue on my mac, OR my Fitbit app and it's keys are not valid.
I can make a video of my attempt as well. Showingin more detail in my steps. Let me know.

03-23-2016 07:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 07:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:07 - edited 03-23-2016 16:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:07 - edited 03-23-2016 16:10
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
From the verbose output of the curl command, this is the error within the output.
< HTTP/1.1 400 Bad Request
HTTP/1.1 400 Bad Request
This is the error I get at the end of the command.
{"errors":[{"errorType":"invalid_request","message":"Missing 'grant_type' parameter value. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."}],"success":false}

03-23-2016 16:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:21 - edited 03-23-2016 16:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:21 - edited 03-23-2016 16:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm running the code on github. It is setup with one ? only, as you instructed.
If you pull down that script and run it with your bits, it's all good for you?

03-23-2016 16:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 16:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I went ahead and created a new Fitbit app, to see if the app, ID or secret were corrupt or something. I set the app to oAuth2.0-personal. Created my temp token via the browser using a local Callback URL that I read would work. http://127.0.0.1:8080. It worked and generated my temp token.
I created the personal 64bit key out of the new ID and secret and hard coded it into the curl command. Updated the callback URL in the curl command.
Got the same **ahem** error.

03-23-2016 23:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-23-2016 23:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I made a couple of changes. Hopefully this fixes your problem. https://github.com/roshepard/fitbit/pull/1
03-24-2016 06:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-24-2016 06:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
THAT WORKED! I just finished stepping through the full process and confirmed the new method works with the refresh token step. ALL GOOD!!!
I'll be putting this into a complete script now, THANKS TOTALLY TO YOU TOM, and will post it when it's working. The goal is to have a single script that will be able to loop through on a cron basis and pull the data down. I'll be playing for the rest of the morning now.
YOU ROCK TOM!

03-24-2016 17:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-24-2016 17:52
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yay! Glad to hear it. I'm debating whether I need to update my post. The `curl` commands work as listed when they aren't embedded in a shell script.

03-25-2016 09:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-25-2016 09:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Your guidance was the first step in that process. One question. Where are the additional "scopes" used in the generation of the first token, via the browser? I tried a few others with no luck.

03-25-2016 09:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-25-2016 09:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'd look here re: scopes. https://dev.fitbit.com/docs/oauth2/#scope

03-25-2016 10:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-25-2016 10:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Play time.


- « Previous
-
- 1
- 2
- Next »