@lpakula I added a Force Refresh Token button on the App page, and a corresponding log to confirm the authorized scopes. Maybe this will help shed light on your 403 error for the event subscription?
@Royski managed to resolve his problem -- maybe he can shed some light on the specific knobs he wiggled?
A suggestion...for the less technical amongst us (i.e., moi) could you include something about "Nest integration" in your thread title...will help folks searching for info on Google/Nest integration to find this important option.
Yeah, this is what got me I think. Not sure about the space, so I set to one line, made sure the space between https://nestservices.google.com/partnerconnections/{{projectId}}/auth?redirect_uri=https://www.google.com&access_type=offline&prompt=consent&client_id={{client_id}}&response_type=code&scope=https://www.googleapis.com/auth/sdm.service andhttps://www.googleapis.com/auth/pubsub existed.
Then got the Code again.
I did delete the app and device too, and re-installed those too. Not sure if this helped or not, but just wanted a clean start.
Ok, I see what happened. I clearly read "there is two links" in the readme, but when I copied it into notepad++ to add in the IDs, the "double click" misses the second.
I deleted the app, devices, and re-did the authorization, and now it shows properly as two links.
Now it's not a 403 error, it's a 409 error. This sounds more like google needs to sync in the background now. I'll let it "rest" overnight and check in the morning.
Just to clarify, is it possible to click the "subscribe to events" more than once? When I removed/reinstalled, I received no errors. Only when I manually triggered the button do I see that.
Aha. The subscription is automatically triggered when you click Authorize (and it logs in successfully). It isn't required as a separate step unless something fails. But when you clicked the button, it probably overwrote the HE accessToken that is in the current subscription (need to fix that part). The alternative would be to delete the subscription using a client like postman - then re-trigger it in HE
Excited to get this working, but technically challenged ! When I'm GCP and creating a OAuth client ID, it asks me for an Application Type. What should I be using?
HI- I know the process is a little confusing, and it seems like there are multiple ways to accomplish this, but I think the simplest way is after you register for device access, go back to Get Started | Device Access | Google Developers and click on the blue "Enable the API and get an OAuth 2.0 Client ID" and follow the directions immediately above that blue button... Get Started | Device Access | Google Developers
Access to the SDM API is provided through GCP. To enable the API and authorize a Google account with a supported Nest device, you'll need a GCP project.
Use the Enable the API and get an OAuth 2.0 Client ID button below to enable the Smart Device Management API and get an OAuth 2.0 Client ID:
If you have an existing GCP project that you would like to use for Device Access, make sure you are logged into the admin account for that project first. Then select the existing project from the list of available projects after clicking the button. Otherwise, create a new project.
Select Web Server when it asks "Where are you calling from?".
Enter https://www.google.com as the value for Authorized redirect URIs . A redirect URI is required to obtain an Authorization Code using Partner Connections Manager (PCM).
Once setup is complete, copy the OAuth 2.0 Client ID and Client Secret values, and download the Credentials JSON to your local machine .
Got a Bad Request (400) on the token request -- I'm guessing one or more characters got missed in the copy/paste of the authorization code from the google redirect url.
I'm still thinking on how to make this more seamless -- e.g. link from App to Google, allow access, then redirect back to App (providing the code directly) - but haven't found the right sequence/set of attributes to make that work yet.