N8n credentials error

Describe the problem/error/question

I’m trying to create a n8n credential that connects to the server itself.
I’m not being able to access.

I add the recently created API key and tried several different setups for the Base URL.
This is one of them:

Can some one help?

What is the error message (if any)?

I get this error message:

" Couldn’t connect with these settings
The service refused the connection - perhaps it is offline"

Please share your workflow

no workflow created, just credential

Information on your n8n setup

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

Docker-compose file used

version: '3.5'
        image: n8nio/n8n:${N8N_SOFTWARE_VERSION_TAG}
        restart: always
            - 50001:5678
            - NODE_ENV=production
            - n8n_data:/home/node/.n8n
            - internal_net   
        driver: bridge

Hi @NET, welcome to the community and sorry for the trouble!

It’s not quite clear to me where you are seeing this error. Is this in the n8n node on the very same machine running n8n?

n8n should in theory be able to talk to itself using a base URL of http://localhost:5678/api/v1:

Are you able to talk to the n8n using the HTTP Request node like below?

If not, which error are you seeing?

Also, do you get any other error when sending a curl request like below from your terminal?

curl http://localhost:50001/api/v1/workflows -v -H 'X-N8N-API-KEY: your api key goes here'