06-19-2015 05:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-19-2015 05:49
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Wondering if anyone can help im trying to pull weight information being gathered using the Aria scales into a 3rd party app and I am using node red to try to do this. Ive got the fitbit nodes appearing in node red and have configured them with the security keys. However it only seems to give me the option to pull info relating to Goals, sleep or badges, which isnt what i really want

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

SunsetRunner
09-08-2016 16:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm trying to do something similar for my own fitness monitoring. What kind of application did you register for (Server, Client or Personal)? My node red application is internal to my home network. What did you put for the response url? I really appreciate your help.

09-08-2016 16:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-08-2016 16:47
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The redirect_uri / callback URL can be local to your network. Fitbit sends the redirect response and the client then requests the URL, so you're fine as long as your client can access the URI.
If it's a Node app, it's a server app.

09-08-2016 17:28 - edited 09-08-2016 17:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

SunsetRunner
09-08-2016 17:28 - edited 09-08-2016 17:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ok - I got the CURL command and ran it. Everything looks great! In order for me to use this, do I have to create a Subscriber account?

09-08-2016 17:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-08-2016 17:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@SunsetRunner wrote:
I set it up as a server app (didn't setup any subscribers). I then went to the O Auth 2.0 Tutorial page and filled in the information that builds the link. I used Implicit Grant flow and then clicked on the link. I then get the following error:
Developer information: unauthorized_client - The client is not authorized to request an access token using this method.
Implicit Grant Flow is a public client app flow. If you have a server app, you must use the Authorization Code Grant Flow.

09-08-2016 17:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-08-2016 17:45
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@SunsetRunner wrote:
Ok - I got the CURL command and ran it. Everything looks great! In order for me to use this, do I have to create a Subscriber account?
You only need to create a Subscriber if you want to use the Subscriptions API.

05-08-2017 08:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-08-2017 08:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am also trying to use Node Red and the apis. I can't seem to get by correct tokens. I have tried to follow the OAuth 2.0 tutorial page, and I get down to 1A Get Code, I see the CURL and use Hurl.it and receive an error
"errors": [
{
"errorType": "invalid_client",
"message": "Invalid authorization header format. Visit https://dev.fitbit.com/docs/oauth2 for more information on the Fitbit Web API authorization process."
}
],
"success": false
I created the application as a Server and am trying to use the Authorization Code Flow. What am I doing wrong?

05-09-2017 13:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



05-09-2017 13:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@OhioSkier You probably have to add the "Authorization: Basic {token}" header back, for some reason it gets removed when you click "Send to Hurt.it".
You can see the example I have in a different thread.

05-13-2017 05:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-13-2017 05:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I still could not get Hurl to work with your suggestions.
Someone suggested that I copy the curl and use the bash shell, that did work (it would be nice if your tutorial page worked). I was able to get to step 3 in the OAuth 2.0 tutorial page. Progress I thought. I copy the key from Step 3 and over to NodeRed. In the Node component I pasted the key into the key field and the Client Secret from my register app page in to the secret key. I pressed the Authenticate with FitBit and no joy 😞 Here is the error received.
Something went wrong with the authentication process. The following error was returned:
401: {"errors":[{"errorType":"oauth","fieldName":"oauth_consumer_key","message":"Invalid consumer key: KEY FROM STEP3"}],"success":false}
One known cause of this type of failure is if the clock is wrong on system running Node-RED.
The version of NodeRed is on IBM BlueMix. Any ideas from here?

05-15-2017 09:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-15-2017 09:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
After talking with someone at work, it turns out the Fitbit components for NodeRed are pre-oAuth 2. Bummer!
Thanks for your help, I understand how to use the code to make the call for the oAuth Token and will incorporate that into my coding rather than relying on the components to do the work.

05-17-2017 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-17-2017 16:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
So one question still remains for me: is there a Node Red node that will work with a fitbit? I have tried using about four different ones and could not get any of them to load in my BlueMix environment. Thanks.

05-18-2017 05:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

05-18-2017 05:37
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
It look like not at this time. The folks that wrote the components for Node Red have know since 2015 that there was an issue with oAuth 2. I have been trying to use functions in Node Red to do what the components should do, but no joy for me yet. More work.

