"Error 401: invalid_client" When Authenticating Google Calendar in n8n Workflow

Problem:
I can’t authenticate the Google Calendar node due to an OAuth error. I’ve set up the Client ID, Client Secret, and redirect URIs in Google Cloud, but the authentication fails.

Error message
“The OAuth client was not found. Error 401: invalid_client”

  • Attempts:
    • Re-entered Client ID and Client Secret in n8n credentials.
    • Verified redirect URIs in Google Cloud.
    • Re-created the OAuth 2.0 Client ID, but the error persists.

What I’ve Checked:

  • The Client ID and Secret match between Google Cloud and n8n.
  • The Google Calendar API is enabled.
  • The OAuth consent screen includes the correct domain and test user.

Information on your n8n setup

  • n8n version: : 1.95.3
  • Running n8n via: n8n cloud
  • Operating system: Windows

I am desperate, please help :folded_hands:

Did you add yourself as test account in GCP OAuth?

Yes :worried:

I am having the same issue …

Can you show how you paste the client id and secret to the n8n?

Need to copy and paste exactly what shows on the red box.

No more or less any string.

I had the same issue, when I checked it again apparently there is a space more in client id that was input, fix it and it works

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.