Nest Authorization Error Error 400: invalid_request

worked perfectly for me! Thank you very much!!! :+1:

Thanks Shane, your insight worked!

Do you think:

  1. the PR is eventually going to go in and cause a problem in master?
  2. this problem only arises in the custom_component?

In the meantime Iā€™ll edit the post above in case it helps someone else.

Hi Travis,

That error looks correct, but do you see a bunch of query params after the localhost:1ā€¦? Youā€™ll need to dissect the URI to find the ...&code=...&... argument. I donā€™t have a screenshot handy.

Unfortunately there is no ā€˜codeā€™ param, that is my issue.

I only have the following 2 params:

authError=...,client_id=...

My old nest api method was working fine but figured now was a good time to migrate to the ā€œnewā€ method. What a stupid mistake that wasā€¦ doesnā€™t look like these workarounds are working anymore either.

I donā€™t get the &code= part in my URL when changing the const.py file. Iā€™ve tried configuring the web app method using the old instructions but the ā€œGo to url here (unsafe)ā€ link goes to https://accounts.google.com/# and gives me a Something went wrong. Please try again. message.

So now I have no nest integration and no way to go back to the older, working method

1 Like

Hello
Just trying to set up the nest integration and getting the Nest Authorization Error Error 400 :frowning:

Where is the issue?
Is it with Home Assistant or with Google?
It would seem to me that the Nest HA integration needs to be, not necessarily fixed but changed to work with Googleā€™s changesā€¦ but Iā€™m only guessing as Iā€™m quite the noob :slight_smile:

And is the workaround not working? as per @ideasman69 is saying?
Iā€™d rather not spend time trying to get the workaround working for it to be dead in the water!

Has anyone succeeded in the workaround? If not, then we might like to add a big WARNING in this thread to say the information is out of date.

Any confirmed successes recently?

I have to go back through my setup as I did actually get this working within the past few weeks in order to get my Nest Doorbell Battery added to HA.

I know that when I first had the problem I was trying to use the Desktop App OAuth method but changed to the Web App OAuth method and got it working.

I just wanted to say thanks to the members above, the workaround with ā€œsubscriber_idā€ and web auth worked for me.

which one in particular? Iā€™ve tried everything I can find and am still having no luck

edit: after trying it once more - with all my edge extensions disabled (uBlock, decentraleyes, clearurls) - it worked as expected using the old instructions that @JamesDeng posted here.

I just wanted to chime in on this issue. I received this error.

The fix for me was very simple. No workaroundsā€¦

under oauth consent screen, put the app into testing

Go back to home assistant then go to devices, click on reconfigure under NEST and follow the prompts in the popup, similar to the initial setup, at the end youll get the new auth key, copy/paste. boom works again.

1 Like

Wow. Was not expecting that simple of a solution to work, but it worked for me as well. Sounds like this will still work through October, so hopefully theyā€™ll have a final solution by then.

After you got the authorization code, did you put it back into production?

If you put it in testing, there is a strong likelihood youā€™ll find the token expires after about 7 days.

You can authenticate every 7 days, itā€™s just a bit of a PITA.

Hi all.

Iā€™ve been trying to get my nest doorbell (battery) up and running on HA.
I found this thread because I was following the new (desktop app) instructions and was getting the error 400: invalid_request.
I tried starting over with the old (web app) instructions, but Iā€™m still getting the error 400 when I get to the step of trying to add the nest integration to HA.

Jake,
Switch your Google project back to ā€œTestingā€ and then try the authorization again. This worked for me, but I am on the 7-day authorization. But at least I know my integration works. The GitHub thread has more information on how to fix this. I just have not had the time to get back to this issue.

DZ

2 Likes

I just received an email from Google regarding OAuth changes that affect my Nest app configuration. I suspect this is not new here but just in caseā€¦

@MikeH I got the same email, yesterday. Is this why everyone is having trouble?

Are there instructions available for the migration of ā€œyour OAuth out-of-band flow to an alternative method before Oct. 3, 2022ā€?

Yes, I suspect it is the reason just by the error message and the timing. I am not technically familiar with this process but if this is indeed the cause, a fix should be relatively easy (famous last words). I will wait for a formal solution rather than trying to work around the issue for now.

I am on a raspberry pi so am also experiencing the high CPU loads as per this thread. Nest doorbell High CPU usage Ā· Issue #66983 Ā· home-assistant/core Ā· GitHub

I need both issues to be resolved before I can use the Nest integration.

I just want it noted that I hate google and ALL of this is a result of their poor decision to remove works with nest. We have to jump through hoops to use the product the way we want that had no issues before google touched it #EndRant