I was wondering if anyone has successfully integrated Withings with their HA install. I’ve followed the instructions here, Withings - Home Assistant, for HA Cloud integration and I’ve been stuck on STEP 3 - AUTHORIZE HOME ASSISTANT. When ever I click the “Allow This App” button I’m redirected to a page stating:
{
"errors": [
{
"message": "redirect_uri_mismatch: The redirect URI provided is missing or does not match partner callback url"
}
]
}
I’ve double checked and my app is configured with the correct url according to those instructions. A search showed me a few other posts that have mentioned this happening before, unfortunately none of those solutions solved the issue. I’m also aware that Withings is going through an API change but I was unable to determine if this integration had already been updated to handle those breaking changes.
One thing I’ve tried already is manually defining my internal_url and external_url in my configuration.yaml instead of handling it in the UI settings. That didn’t work either
Any insight or possible solutions would be greatly appreciated.
Thanks for that, but can you expand it a bit? Which protocol are you referring to? the protocol in the url for the external_url settings in the configuration.yml file?
The trailing slash is in the url on the console?
Trying to get this working but having a hard time so far…
Also, I’m running HA in Docker with a Reverse proxy in front of it for external access, if that is important.
Trying to setup withings. however during setup it redirects to the withings app page and ask if the app should be granted access. when i acknowledge this the failure pops up [redirect_uri_mismatch” error]
i simply followed the instructions omn the HA INtegration page. The problem now is, i can’t even delete or disable withings form HA.
So what is required to get this to work? It doesnt seem to be straight out of the box experience
I am also ending up with redirect_uri_mismatch when trying to activate the Withings integration.
Setting base_url doesn’t work for me. Probably a good thing, because it is deprecated anyway.
Since I only get to the point of activating the integration at Withings with correctly set external URL in network settings, I hope that everything is good on this side.
I am very happy for the my Home Assistant service’s existance, since I am using a port in my personal URL which is not supported by Withings. @allenporter: May I draw you into this? Generally my seems to work for most people and it looks to be working fine for me as well until Withings tell me how unhappy they are about my URL.
It shouldn’t be related to anything in my public URL (be it certificate, port, or whatever) when I am using my, right?
I followed the documentation to the letter and Withings at first accepts https://my.home-assistant.io/redirect/oauth as callback URI.
But then during configuration (no matter if via my service or manually) after clicking on “accept this app” I’ll get the {"errors":[{"message":"redirect_uri_mismatch: The redirect URI provided is missing or does not match partner callback url"}]} response.
Interesting!
Following through my Home Assistant it tries to open the following link which leads to the Withings page but ends in the error: https://account.withings.com/oauth2_user/authorize2?response_type=code&client_id=[ID here]&redirect_uri=[external HA url here]/auth/external/callback&state=[lenghty token here]scope=user.info,user.metrics,user.activity,user.sleepevents
Replacing [external HA url here]/auth/external/callback with https://my.home-assistant.io/redirect/oauth prevents the mismatch error and I am getting one step further getting asked by my Home Assistant if I want to link the account. Confirming this leads to a simple “error” message in Home Assistant though.
Hmm. How would I check?
default_config is included and to be sure, I now added my: to configuration.yaml.
And clicking the my… links triggers actions within my HA.
Can’t spot anything in the logs either.
Sorry, only seeing your comment now.
I read through this. It all seems to lead to this workaround: https://github.com/home-assistant/core/issues/72614#issuecomment-1152366510
However, I don’t use the cloud service and already played around a bit with the external URL. Any advise what to put here if not my external URL?
Just in case others also experience this, here’s what worked for me after the integration stopped working a couple of weeks ago…there may also be some bugs, but I think what’s actually happening is that people who have had it working for a while are not aware of the full configuration changes that now need to be made to keep it working:
Add my: to configuration.yaml if it’s not already there (old install in my case, never had it)
Configure the URL in https://my.home-assistant.io to be whatever URL you’re actually using to set this stuff up (in my case, the Nabu Casa URL). This is key, because if you’re using a local IP in the browser while setting this up on your PC but the URL in https://my.home-assistant.io is an external one, like the Nabu Casa URL, the Withings setup will not work!
Unfortunately, following the authorization page I am still getting the infamous: {"errors":[{"message":"redirect_uri_mismatch: The redirect URI provided is missing or does not match partner callback url"}]}