n8n errors / Auth

Request failed with status code 401

platform: n8n / category: Auth / code: 401

Cause

The target API rejected the request because valid authentication credentials were absent or invalid in the headers.

Fix

Verify the API key/token is correct and not revoked. Ensure the header name matches the API spec (Authorization: Bearer vs x-api-key). For OAuth2, refresh the token and re-save the credential. On self-hosted n8n, confirm DB env vars are set so the internal auth layer initialises.

Source thread →

Part of the Automation Error Index — n8n errors: browse all.

Hitting an automation error we have not covered?

AutomateLab builds and debugs n8n, Make, and agent workflows as fixed-scope projects. If something is broken in production, tell us what you are seeing.

Describe the problem