n8n-io/n8n · error · ChatTriggerAuthorizationError
Authorization data is wrong!
Error message
Authorization data is wrong!
What it means
The Chat Trigger uses Basic Auth, the request supplied Basic credentials, but the provided username/password do not match the ones stored in the node's httpBasicAuth credential. The node throws ChatTriggerAuthorizationError(403) — credentials are present but wrong.
Source
Thrown at packages/@n8n/nodes-langchain/nodes/trigger/ChatTrigger/GenericFunctions.ts:35
} else if (authentication === 'basicAuth') {
// Basic authorization is needed to call webhook
let expectedAuth: ICredentialDataDecryptedObject | undefined;
try {
expectedAuth = await context.getCredentials<ICredentialDataDecryptedObject>('httpBasicAuth');
} catch {}
if (expectedAuth === undefined || !expectedAuth.user || !expectedAuth.password) {
// Data is not defined on node so can not authenticate
throw new ChatTriggerAuthorizationError(500, 'No authentication data defined on node!');
}
const providedAuth = basicAuth(req);
// Authorization data is missing
if (!providedAuth) throw new ChatTriggerAuthorizationError(401);
if (providedAuth.name !== expectedAuth.user || providedAuth.pass !== expectedAuth.password) {
// Provided authentication data is wrong
throw new ChatTriggerAuthorizationError(403);
}
} else if (authentication === 'n8nUserAuth') {
const webhookName = context.getWebhookName();
if (webhookName !== 'setup') {
function getCookie(name: string) {
const value = `; ${headers.cookie}`;
const parts = value.split(`; ${name}=`);
if (parts.length === 2) {
return parts.pop()?.split(';').shift();
}
return '';
}
const authCookie = getCookie('n8n-auth');
if (!authCookie) {
throw new ChatTriggerAuthorizationError(401, 'User not authenticated!');View on GitHub (pinned to 5ac6606e81)
Solutions
- Verify the username and password the client sends exactly match the httpBasicAuth credential bound to the node.
- If the credential was changed, update the client with the new values.
- Re-open the node to confirm which httpBasicAuth credential is actually selected.
Defensive patterns
Strategy: validation
Validate before calling
// Ensure the caller's credentials match the node's expected values before sending.
if (callerUser !== expectedUser || callerPass !== expectedPass) {
throw new Error('Credentials do not match the Chat Trigger httpBasicAuth credential.');
} Prevention
- Keep the httpBasicAuth credential and the client configuration in sync (e.g. share via a secret store).
- When rotating the password, update both the credential and all clients in one change.
When it happens
Trigger: providedAuth.name !== expectedAuth.user OR providedAuth.pass !== expectedAuth.password, where providedAuth comes from parsing the request's Authorization header and expectedAuth from the httpBasicAuth credential.
Common situations: Typo in the username/password the caller sends; the password was rotated in the credential but the client still uses the old one; the caller copied credentials from a different Chat Trigger instance.
Related errors
- Authorization is required!
- No authentication data defined on node!
- User not authenticated!
- Webhook request failed: ${response.status} ${response.status
- Default webhook url not set
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/f2842ae8110b63ab.
Report an issue: GitHub.