dkilgore90 / google-sdm-api

Apache License 2.0
70 stars 22 forks source link

Authorization Error #93

Closed SaltedM3mes closed 1 year ago

SaltedM3mes commented 1 year ago

When authorization for the app is happening after I have checked what I want to allow google nest permission’s. I get an error saying

access blocked:authorization error

This app is not yet configured to make OAuth requests. To do that, set up the app’s OAuth consent screen in the Google Cloud Console https://console.developers.google.com/apis/credentials/consent?project=${your_project_number}

If you are a developer of this app, see error details.

Error 403: restricted_client

If I click on see details-

Error 403: restricted_client Request details: access_type=offline login_hint=seancarney14@gmail.com response_type=code redirect_uri=https://cloud.hubitat.com/oauth/stateredirect state=adddf626-a106-4333-9d84-6882797cc2c7/apps/20/handleAuth?access_token=bbd0abfe-dc9c-46b5-8dd8-e46a81a3ef8b prompt=consent client_id=320488993527-8r15mpsmv3s47lm7v7ovqcmlevin5vub.apps.googleusercontent.com scope=https://www.googleapis.com/auth/sdm.service https://www.googleapis.com/auth/pubsub

dkilgore90 commented 1 year ago

Doing some cleanup and realized I had missed this ticket being opened. Sorry for the delayed response, are you still having issues? Usually an auth error like this one is tied to the Google Cloud Project OAuth2 configuration -- in console.cloud.google.com, if you navigate to APIs and Services > OAuth consent screen, your project will show either Production or Testing -- I've found Production to be the most reliable (avoids other limitations such as auth expiration of 7 days) but if you want to keep in Testing, you need to add your Google account as an authorized user.

dkilgore90 commented 1 year ago

Closing as this ticket has gone stale.