N8n API Error Message - ECONNREFUSED

Describe the problem/error/question

Hello,
I am not able to connect to the n8n API in the Credentials menu. I am however able to access the API via the API Playground and can, e.g. create or delete workflows.

I used http://localhost:5678/api/v1/ as the base url and I pasted the API key from the Settings/n8n API.

Please advise what I am doing wrong here! Thank you very much.

What is the error message (if any)?

Couldn’t connect with these settings
Retry
ECONNREFUSED

Please share your workflow

N/A

Information on your n8n setup

  • n8n version: 0.236.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: macOS 12.6.3

Hi @bssei, I am sorry you’re having trouble.

You mean this screen, right?

Can you confirm which command exactly you are using to run n8n? Is there perhaps a white spaces anywhere in your base URL field?

And does calling the API directly via the HTTP Request node throw the same error for you, for example like below?

2 Likes

Thank you so much, @MutedJam. There was a white space in the base URL.

Thank you. That is working now.

1 Like

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