Getting Error 400: invalid_request after following the official integration docs (Nest - Home Assistant)
The good news is I just went through the steps @JamesDeng outlined for Web Auth, and it worked! I did recreate a new project in the device access console to avoid the client ID mismatch issue that might happen.
Glad that worked. Somehow it stopped working for me. I ended up setting up a new āWeb Applicationā app and grabbing the ācodeā from the url when the reauth fails. I have to do that every 7 or 10 days. Not the end of the world. I hope this gets fixed permanently.
@kg23 Iām having issues setting up the Nest integration. It appears to be failing during reauthentication, so Iām wondering what you mean WRT the ācodeā from the url?
When my āDesktop Applicationā integration expires (every 7 or 10 days), I go through the re-auth steps in HA. Eventually it fails b/c my HA installation isnāt exposed to the internet for the OAuth response. At that point there is a code parameter in the URL. I paste that into the HA Nest auth form.
Error 400: redirect_uri_mismatch
The redirect URI in the request, urn:ietf:wg:oauth:2.0:oob, can only be used by a Client ID for native application. It is not allowed for the WEB client type. You can create a Client ID for native application at https://console.developers.google.com/apis/credentials/oauthclient
Iām not the best at explaining what I did, but here goes. Hope it can help.
What worked for me but do require Cloud:
I logged into āGoogle Homeā on my phone, and made sure my cameras and thermostat were available there. I also configured a new entity in the Google Home app and searched for Home Assistant. Added it, logged into my Nabu Casa account and made sure i was connected.
I ended up subscribing to the Home Assistant Cloud with the Nabu Casa account. Made sure to log into my Home Assistant remotely first in a different browser tab.
I followed every step as per the current Nest Integration when integrating the app in HA.
After failing with the OAuth for App when integrating Nest, I ended up testing OAuth for Web Web App instead of the Desktop App, but got the same error - only the URI redirect link was with my Nabu Casa account link for my Home Assistant.
In a different tab, I kept the Google Could Console credentials page open (under APIās & Services). I then added under āAuthorized redirect URIsā the same URI i got in the āERROR 400: URIā message that is located at the very bottom of the error message XXXXXXXXXX.ui.nabu.casa/auth/external/callback. (You might have to press that ādownā arrow in the error message.
Replace the XXXX with the address you have and paste it.
Hit āSAVEā for the credentials - and boom. I was finally allowed to finish the remaning steps from the original instructions as seen below from the original instructions.
Magic happened and after several hours of failing.
But tbh, screw Google with their sensitive approach to it allā¦ Just make it native cloudless. I might end up changing devices because I want to be free from any cloudservice. But for now, I just want it working untill I decide to invest differently.
Hi there, sorry for the question a bit OT, but is there anybody facing issue paying the Device Access Fee of 5$???
I am asking because it seems that the snippet that required the payment is not compliant with the new PSD2 payment autorization in Europe and therefore I am not even abble to go further with the device access registrationā¦
Iāve asked different friends with their own google account and they are all facing the same issue ad the check-outā¦
Google support on this is demanded to stack overflowā¦and nobady seems to be aware of the problem.
Thanks @abigmoocow for your tip about the URI - that got me over the finish line, along with not needing to expose Home Assistant to the internet. That meant all I had to do was get a free domain + ssl certificate, which I got from DNSExit.com, and it looks like I only needed https for the authorization step - no need to automate the certificate renewal since I can go back to http now. Everything still works internally without https once authorized (and no internet forwarding of course).