Can't access n8n cloud api from self-hosted n8n

Describe the problem/error/question

I’m trying to access my n8n cloud from my self-hosted instance using the n8n api.. I have verified the api key multiple times..

Is this supposed to work or is it blocked by the platform? I"m trying to use an n8n node on self-hosted to read all the workflows.

What is the error message (if any)?

unauthorized.

Please share your 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):
  • Operating system:

Hey GS,

When I look at the workflow you have posted, the n8n node does not show a credentials field - this is where you would specify the API key for the local server. Should look like this in the node settings:

image

Do you have this ? If not then might be worth updating your local n8n instance.

If you do have this and it contains the correct credentials then this could be because your N8N_HOST and/or WEBHOOK_URL environment variables are not set correctly in your docker-compose or .env files (assuming you are using Docker to run n8n). Can you check these ? I tihnk the n8n node will use these to ‘find itself’.

In .env, they should look something like this:

N8N_HOST=localhost
WEBHOOK_URL=http://localhost:5678

Hope this helps.

Rgds
Simon

The base url should be your n8n cloud endpoint with /api/v1

Can you check the setting from the n8n node credential?