The OAuth2 credeitial for Google (YouTube) gets invalid every day

I’m using n8n.cloud.

I have created an OAuth2 credential for the HTTP Request node and this works when the credential is configured, but it stops working after a day.

I think there is a configuration problem with refreshing the access tokens.

Reconnecting the OAuth2 makes the node working again.

Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
Access Token URL: https://www.googleapis.com/oauth2/v4/token
Client ID: xxxx.apps.googleusercontent.com
Client Secret: ****
Scope: https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.readonly
Auth URI Query Parameters: access_type=offline
Authentication: Header


Endpoint: https://youtubeanalytics.googleapis.com/v2/reports

Any helps would be appreciated.

Thanks in advance!Preformatted text

Hey @umireon,

Which version of n8n are you using? If you’re on 0.140.0, I suggest you either roll back to 0.138.0 or update to 0.141.0. We have fixed the issues with v0.140.0, and it should be resolved with the newer version

Hello @harshil1712,

I checked the other Google nodes of n8n.io and found https://oauth2.googleapis.com/token as Access Token URL.
Google seemed to deprecate https://www.googleapis.com/oauth2/v4/token.
I just try https://oauth2.googleapis.com/token as Access Token URL and write here if this works.
Japanese document is so bad.

I’m using 0.131.0.

Thanks

I recreated the credential and it works. Thanks!