Describe the problem/error/question
Lately I have been experiecing a huge issue with google. I tried both OAuth and/or service account but it is not connecting neither through local hosting or through n8n.io. Can someone help?
What is the error message (if any)?
Error: Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).
More details
{"error":"invalid_client","error_description":"Unauthorized"}
Failed to connect. The window can be closed now.
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your n8n setup
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker & n8n cloud
- Operating system: Mac
Hey @Matilda_Leo experiencing authentication failures with Google across both OAuth and Service Account methods, on both local and n8n.io. The error "invalid_client" and "Unauthorized" indicates a credential configuration issue.
Hi @Matilda_Leo
invalid_client means Google does not recognize the client that is trying to authenticate. In practice this usually happens when:
- the OAuth client type is wrong (not “Web application”), or
- the redirect URI configured in Google does not exactly match the one n8n is using, or
- the Client ID/Secret in n8n don’t match the ones currently stored in Google Cloud.
Fixing those three points resolves the vast majority of cases.
If it still fails after that, the next things to check are:
- the OAuth consent screen is published (not left in an unusable test state for external users), and
- you are authenticating in the same Google project where that OAuth client was created.
So recreating the OAuth client as a Web application and re-pasting fresh credentials is usually enough, but only if the redirect URI and project/consent configuration are also correct.