Redirect_uri=urn:ietf:wg:oauth:2.0:oob not working with Nest SDM Binding

When setting up the nest binding I have gotten everything setup up to getting the authorization code, however I cannot get the code to work. When I use the URL provided in the docs for the authorization code I get the "Can’t Link with “Partner(appname)” error and cannot get past this.

However if I configure the oauth creds to use web server and configure the URI to use google.com as described in the nest docs(Get Started  |  Device Access  |  Google Developers) I can get the authorization code, but then the binding give me this error: CONFIGURATION_ERROR Failed to authorize SDM client. Check the authorization code or generate a new one.

Not sure how to proceed from here, and I would really like to get this binding working.

I’m not sure what the state of the Nest Binding is due to the Works With Nest program being shuttered. I do know that if you’re using a Google account, this binding won’t work.

There’s an ongoing discussion about a new binding that uses Google Device Access Control, which you should check out. I don’t use it, so I haven’t kept up to speed on the developments.

Not sure if this helpful to you. I just wanted to point you to the DAC discussion in case you weren’t aware of it.

1 Like

Thanks! I will go check this one out. I have just seen in other discussions that people have gotten the SDM binding working, in the last couple months and wanted to make sure I am not going crazy or doing something wrong. haha

If you don’t want to go through hundreds of outdated community posts, you can also read the binding documentation which is up to date and will also tell you that it supports both the old and new API and how to set it up. :slight_smile:

1 Like

Also make sure you generate the api credentials for the correct device type as this will impact the redirect uri. If you follow the link in the post before it should work!

Update on this: After many many many tries, I got this all working not 100% sure what changed to make it work but managed to get the following URL to work for the authorization code without getting a URI mismatch error:

https://nestservices.google.com/partnerconnections/{project ID}/auth?redirect_uri=urn:ietf:wg:oauth:2.0:oob&access_type=offline&prompt=consent&client_id={Client ID}&response_type=code&scope=https://www.googleapis.com/auth/sdm.service

Thanks everyone for your suggestions. I now know more about the google oauth stuff than I thought I would ever know lol.

1 Like