Authorization failed when creating n8n API credential

Describe the problem/error/question

I have created an N8N API key as instructed here: Authentication | n8n Docs, and tried to create a Credential for type N8N API, but I received the error: “Couldn’t connect with these settings: Authorization failed - please check your credentials”

Information on your n8n setup

  • n8n version: 0.222.3

Hi @almir.cunha :wave: Welcome to the community :cake:

Can you let us know how you’re trying to use the n8n API? Are you trying to connect through the n8n node, or are you making a cURL request or using something like Postman? If so, can you provide an example request (with any sensitive information like API keys removed)? If it’s through the n8n node, can you please provide your workflow?

Please also provide this information on top of your n8n version:

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

The error occurs when creating the credential for the API Key.

The details:
image

Hi @almir.cunha, looks like you didn’t confirm the version of your n8n instance as requested by @EmeraldHerald above.

On the actual issue, I can’t seem to resolve n8n.us.incognia.tech from my end:

image

So I am wondering if your n8n instance might not be able to resolve this URL either? Perhaps your instance is able to talk to itself via http://localhost:5678/api/v1 like below?

Also, make sure you don’t have any trailing or leading spaces in your API Key field when seeing Authorization failed messages.

1 Like