Hello everyone, hope u all are okay.
Well, I’m trying to create a credential to connect to my Google Drive, but when I go to Sign in with Google, I get an error that says: your redirect_uri is wrong.
But when I see the details, the request URI is not the same as I put in the OAuth Redirect URL field…
What could that be?
Information on your n8n setup
- **n8n version: 0.236.1
- **Database (default: SQLite): Postgres
- **n8n EXECUTIONS_PROCESS setting (default: own, main):
- **Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Caddy
- **Operating system: Ubuntu
I belive you need to update either the N8N_HOST or VUE_APP_URL_BASE_API environment variable. Also make sure on your Google API setup that the API url is correct. Here I’m using the cloud version in my google api credentials setup.
well, everything looks fine with my N8N_HOST and authorized URI on Google Drive…
also… everytime I recreate my containers the redirect URI from my request just changes
take a look:
are you using the --tunnel when creating the container. I know that its not a very good option in production. So every time you call the --tunnel there is a good chance that is going to change. If this is the current url it has for you in your n8n session you need to add the new callback url in the creditials setup in n8n to the google api connector.
example in my docker i have these to set my domain in my container build
-e N8N_HOST=wigginsphilip.duckdns.org \
Which makes my oauth callback url look something like this
So in my Google API creditials in the admin panel I have that callback url in the Authorized redirect URL.
So in your case you need to go to the Google API credentials and update the Authorized redirect URI for your credential to