Can't use the Google Calendar integration

I am trying to implement a Calendar to my HA Dashboard, but I can’t Add Google Calendar integration to my HA.


after this screen, I press Advanced and then go to Home Assistant (unsafe)

After I press Allow I’m getting this screen:

Right after that in my home assistant web, I’m getting that it’s failed:
image

I need help with how to workaround that, thanks a lot!

still need help

Anything in the error logs?

Nothing in the logs.

Odd!

Typically this means there is a network issue talking to Google. The most common reasons are ipv6 setup or dns as blocking.

The network is great, I think it has something to do with the oAuth I have.
But I followed some guide.

You’ll need to get additional data from the logs, so i recommend turning up:

logger:
  default: info
  logs:
    homeassistant.components.google: debug
    homeassistant.helpers.config_entry_flow: debug
    homeassistant.helpers.config_entry_oauth2_flow: debug
    gcal_sync.api: debug
    gcal_sync.auth: debug
    oauth2client: debug
    oauth2client.client: debug

Then looking in the “full log” for debug messages that may give us an idea of whats happening.

I’m not implying you have a bad network, just saying those are the common reasons. (everything else works, but for some reason google is blocked and its the first integration to notice this)

After adding those lines in the configuration.yaml
I’m getting this message when trying to add back the integration
image

This implies that the Application Credentials - Home Assistant may be mismatched. When removing the integration it asks if you want to preserve the existing credentials or delete them, but now they need to be manually deleted since they are out of sync with the google side

Well, I just manually removed it, added back the integration, and put in the updated oAuth credentials, and it gives me the same error.

Which browser are you using? I had similar problems with firefox on linux while it worked in chrome.

Using Google Chrome latest version.

In this case it seems to be something else, sorry.

Invalid token data means there is something still incorrect about the oauth credentials.

Is it possible for you to show me what to do with the OAuth credentials? I followed some guidelines but I think something is wrong there.
Since in the guide he says Web Application but the Google Calendar in Home Assistant requires the OAuth to be TV app (type)

Hi,
The instructions to generate credentials are linked during the configuration flow and documented here: Google Calendar - Home Assistant

I would not recommend following any other sources.

(That is definitely your issue, you can’t use Web Application)

Did everything from scratch, and got to Step number 5 on the ‘OAuth and Device Authorization steps’
and getting the same error I had before

Okay, I had to click Advanced and go unsafe (like I did before) and now it worked.
I think my only problem compare to the other sources is that I never enabled the API.

Thank you very much!

1 Like

OK glad you got it working. I have a issue Google Calendar API disabled error message can be improved · Issue #82176 · home-assistant/core · GitHub tracking improving that error message when the API is disabled.

1 Like