Error using Oauth Authentication

Describe the problem/error/question

Hello,
I have a local instance of n8n running on the latest stable release. I am experiencing issues while configuring OAuth connections for the tools (both Gmail and Outlook). I receive the error shown in the attached image.
n8n is correctly published and accessible over the internet.

What is the error message (if any)?

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:
    2.8.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
1 Like

Hi @Nico_Gualtieri Welcome to the community!
Have you properly configured the redirect URL in the gmail on google cloud console? And what service are you using to make your local n8n instance live to the internet?

hello nico,

make sure your adding exact redirect url from n8n u were using, and also always enable the tool u wanna create,also for my opinion make sure you adding separate clien id if you wanna using different tool, so wht i mean by that each tool has different cliend id and secret

may this help

Hey @Nico_Gualtieri, that 403 error when generating the auth URL usually means the OAuth app itself isn’t set up right on the Google/Microsoft side rather than an n8n config issue. For Google specifically you need to make sure you’ve enabled the Gmail API in your Cloud Console project (APIs & Services > Library > search Gmail API > Enable), and if your app is still in “Testing” mode you need to add your email as a test user under the OAuth consent screen settings. The redirect URI stuff the others mentioned is important too but a 403 at the authorization URL generation step is almost always the API not being enabled or the OAuth consent screen not being configured properly. What does your OAuth consent screen look like in Google Cloud Console, is it set to Internal or External and have you published it or added test users?