Fitbit Integration Authentication Instructions?

I’m trying to add this, but there’s a problem. The callback url is set to the local ip for some reason (http) and not https (because that’s not configured). I go via the nabu casa cloud. If I set that as callback url, the integration fails miserably. Ok, I change the wrong http local ip url in that adress to the naby casa url and I get the authorize page, I select every option hit authorize and than i get a big fat 500 internal server error. How does this work? And what’s the correct callback url if you use Nabu Casa cloud? Is that a bug that it only works on the local ip? Because I don’t want to set that up again with let’s encrypt and the whole stuff. Nabu Casa is easier and I support HA with that money.

2 Likes

I have the exact same issue as stefan. I remember setting this on my previous HA instance before and I had to try a million things until it worked, but now for the life of me I can’t figure it out.

Tried everything, same as mrkesu had it working in a previous installation but now really stumped.

we now have .

  external_url: https://redacted.duckdns.org
  internal_url: http://192.168.0.63:8123
  

#http:
#  ssl_certificate: /ssl/fullchain.pem
#  ssl_key: /ssl/privkey.pem 
#  base_url: https://redacted.duckdns.org

Tried it with NGINX turned on / off, DuckDNS on / off, some of or all configurations in .yaml commented out.

Also tried

I remember months back in my original setup I used my external I.P. but again cannot remeber exactly what worked.

Have HA given up on the fitbit Integration?

I got mine to work now with Nabu Casa.

  1. With the new internal\external URL settings in the UI I set both to “https://.ui.nabu.casa”
  2. Edited fitbit app to use “https://.ui.nabu.casa/api/fitbit/callback” as callback
  3. Rebooted home assistant
  4. Opened notification to configure fitbit and clicked the link.
  5. Nothing happened (?)
  6. Checked states under developer tools and YAY, sensor.weight is there from fitbit!
  7. Get depressed about my weight.
1 Like

explain number 2; there’s no such thing as a fitbit app, where does it say that?

I was able to use the Fitbit integration for several months. Then one day it stopped working. I can’t remember when or what changes I made around that time,or if it was when I was making changes, or if I was making changes around that time, or if it was weeks or months ago that it stopped working. Then I set it up with the Nabu Casa url. I wanted to spend time trying again to set it up without Nabu Casa in case I ever stop using Nabu Casa. Now. I can’t see Fitbit in the Integrations page of Home Assistant Configuration even if I take the Fitbit data out of the sensors.yaml. I haven’t signed out of Nabu Casa and am wondering if that is the reason it doesn’t show up.I think I am giving up and leaving it as is unless it breaks.

edit: I also realized that I could have tried deleting the app on the Fitbit end

I think he is talking about the app at Login

Hey guys, im trying since a few days now and no matter what i do i always get this message when i want to authorize the app.

Developer information: unauthorized_client - Invalid client_id

I have no idea what i did wrong, as i just copied and pasted the client_id given to me into the fitbir.conf

Any ideas?

I see this issue got closed and merged (Fitbit authorization always ends up with Server Code 500 · Issue #49285 · home-assistant/core · GitHub), does anyone know when this makes it into a core HA release? I just updated to 2021.6.6 but I still get the same issues trying to authenticate…

i still have problems with the docker home assistant container :frowning:

I’m still not able to get past the authorization no matter how I try to change the url. Does anyone have this working with nabu casa?

2 Likes

I also have the same issue with Nabu Casa.

I have it working with Nabu Casa. I used the Nabu Casa URL in the Fitbit app registration. You have to use a URL that is https NOT http. Then when I went back to HA to finish the configuration, the plugin redirects the oauth link to your internal http URL which doesn’t work. So I copied it out of the browser, replaced the internal URL part with my Nabu Casa URL and pasted it back in the browser. I restarted HA and waited for the polling to start.

1 Like

Looks like this process gets the URLs wrong as HA always puts in your local http://IP address. For me the client ID was also wrong. So at each stage of authorization copy the URL, correct the client ID and address for HA and open the correct URL in a new tab/window. That’s what finally got it working for me.

i dont know with is the problem for me. the url its correct with the correct url redirect and the correc client id. but allways have the same error:
Developer information: invalid_request - Invalid redirect_uri parameter value

:frowning:

Same here, still after countless attempts.
Could anyone having a working integration please make more detailed instructions how to get this working?

2 Likes

@bassor Follow the instructions here:

When you restart, follow the instructions in the messages but with some key parts:

  • The callback URI needs to be your external address and you have to use https - use DuckDNS or LetsEncrypt so sort out connecting to your HA installation via https.
  • Once you have your client ID and secret the next URL generated is also wrong. Look through it and check bit after client_id= is the same as you copied before. Then check that the uri is the external address for your HA system. Correct those parts then open that corrected URL. On the page that comes up, select the first box for access to everything (seems to give errors if you choose anything else), then and you should be up and running.

Thanks for your help. Really don’t know why just cannot make this work. Tried so many times…
Starting to wonder that it has something to do with my Fitbit account, it dates back to 2012.

well, there’s the problem.

That’s when the world ended. :wink:

Sorry, JK. Carry on.

Here is how I got it to work: Link HA to Fitbit