Fix n8n HTTP Request 401 Unauthorized

A 401 Unauthorized usually means the server did not accept the credentials as sent. In n8n, a common source of confusion is whether the API expects Authorization: Bearer TOKEN, a custom header such as X-API-Key: TOKEN, Basic Auth, OAuth2, or something else.

Check your header format locally

This helper does not send the token anywhere. It only shows the header format in your browser. The preview masks the secret.

Choose the pattern required by the API documentation.

Header preview will appear here.

Which option should you use in n8n?

Common 401 mistakes

  1. The API expects Bearer TOKEN, but only the token was sent.
  2. Bearer Auth is selected, but the token field already contains the word Bearer, causing a duplicated scheme.
  3. The API expects X-API-Key, but the key was placed in Authorization.
  4. The credential is expired, revoked, scoped for another resource, or belongs to a different environment.
  5. The endpoint requires OAuth2 or another auth flow rather than a static API key.

401 vs 403

401 generally means authentication was not accepted. 403 generally means the server understood who you are but that identity is not allowed to perform the requested action. APIs differ, so always verify the provider's documentation and error body.

Build the rest of the HTTP Request →

Fix “JSON parameter needs to be valid JSON” →

See n8n HTTP Request JSON examples →

Did this page solve your problem?

Optional anonymous feedback. The counter stores only a timestamp and fixed event name; your token or API key is never included.

All free tools