N8n hosted on Railway and GHL oAuth 2.0 Setup Issue

Describe the problem/error/question

I currently have n8n hosted in Railway. I’m having issues connecting it to GHL using oAuth 2.0.

In my normal n8n cloud account everything works great, but I’m always getting errors during authentication using it via Railway.

I have an App setup in GHL Marketplace, with selected scopes, client keys, and Redirect URLs. I tried the provided callback URL, and also switching the first part of the URL with my custom domain, but no luck.

I also tried using a Generic HTTP oAuth 2 API request, but I’m getting similar errors.

Anyone has some insights on it?

Thanks!

What is the error message (if any)?

Messing with different setups I just got 404 or 400

Information on your n8n setup

n8n version: 1.63.4
Database: Postgres
Running n8n via Railway Template

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

hello @Simon_Kang

how your callback url looks?

Hey @barn4k, thanks for the reply.

The call back looks like this:
https://primary-production-a5af.up.railway.app/rest/oauth2-credential/callback

but I also tried, since I changed the domain:
https://simonkang.up.railway.app/rest/oauth2-credential/callback

Callback URL looks good. Can you show how the error looks?

Seems something is missing in the configuration

Absolutely!

Hey @Simon_Kang,

Can you make sure you have WEBHOOK_URL set to https://simonkang.up.railway.app

Hey, @Jon! Thanks for the reply. Yes, in railway I set the variable WEBHOOK_URL to https://simonkang.up.railway.app, but no luck.

It’s interesting that it works perfectly in the normal n8n cloud version.

Having the same issue… tried using a generic Oauth credential , tried creating a new App on ghl marketplace etc… nothing works

Having the exact same issue… tried everything… error 400 access token needed… any updates?? is it a railway issue?? havent tried in the N8N cloud option

It seems the issue is with railway. I Installed n8n in Digital Ocean, and now, everything is working just fine.

mmm I tried Make and N8N cloud and now am getting error 401 on both… none of these are hosted on Railway… so strange…

If you are having issues on the cloud version, I’m sure the problem is related to something else. GHL oAuth 2.0 is only available on the $497 plan. Make sure you are on that plan otherwise, use 1.0.

Also check if the callback URL is set correctly.

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