Google Calendar Integration: "Received invalid token data." error!

I currently have a working Google Calendar Integration (which was automatically imported from my configuration.yaml file). Since it was already imported and working, I deleted the old respective lines from my configuration.yaml a while back.

Anyway, I would like to redo my Google Calendar Integration from scratch. However, I am receiving the “`Received invalid token data.” error every time I try to create it.

Before starting from scratch:

  1. I deleted the existing/working application credential under the 3 dot menu.

  2. Also, while HA Core was stopped, I deleted the below files; and, started up HA Core again
    config\.storage\application_credentials
    config\.google.token
    config\google_calendars.yaml

When I add the Google Calendar integration, it first asks me to create my Google Calendars application credential. After I enter the SAME IDENTICAL previously working “client_id” and “client_secret” , I get prompted with the Received invalid token data error.

It appears there may be something still stuck in my configuration. What am I missing? I guess I could restore from Supervisor backup… however, I would still like to get this working from scratch using the new method since I’ve never done this before.

2 Likes

I ran into this today as well. Did you find a way to fix it?

I never did. I’m still using the one that was originally imported from configuration.yaml. It still seems to work as long as I never try to delete it and try to add the same token back through HA lovelace GUI. I never tried creating a completely new token in the Google cloud and add a new one through the GUI

I figured it out. My old credentials were created as “Desktop app” type. For some reason, those credentials won’t work with the new integration. You have to follow the documentation’s instructions to a T and create credentials for “TVs and limited input devices”.

After I did that things worked fine.

It was just unexpected to have credentials that worked fine before, and then wouldn’t work. I didn’t expect to have to create new creds. 🤷

3 Likes

Thanks for this valuable tip. Ill check it out.