Google Calendar Integration no .google.token file

Following the instructions here:

My setup:
System Health

version: core-2022.3.8
installation_type: Home Assistant Supervised
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.9
os_name: Linux
os_version: 5.10.0-11-amd64
arch: x86_64
timezone: America/New_York

I have completed the steps and I have the green check mark for API Enabled. I have also added
google:
client_id: MY_CLIENT_ID
client_secret: MY_CLIENT_SECRET
to my config.yaml

What I am not seeing is a .google.token file in my config directory. The instructions make it sound like the file should just appear, but that hasn’t happened. I know this is a hidden file, but I can see the other dot-files, so it isn’t something that simple.

Similarly I don’t have a google_calendars.yaml file either. And when I restart my server, I get an error:

Google Calendar Setup

Error: Invalid response 401. Error: invalid_client
You will need to restart hass after fixing.

Any idea where I may have missed a step?

Skip

This means that your oauth client id is not valid. Maybe double check that it is associated with the right google account that you authorized. You may want to recreate it in the cloud console and update configuration.yaml

OMG, I’m an idiot. I had my client id and client secret swapped. All is well now. Thanks!

can someone point out the location of this hidden file “.google.token”. i need to delete it. Thanx

The latest versions of home assistant don’t use this for anything anymore, and calendar has been moved to use the standard home assistant authentication libraries. Check out the latest setup instructions: Google Calendars - Home Assistant