80019: Token request failed

token_request_failed

The Ably SDK failed to retrieve a token from the configured authUrl or authCallback.

What you should do

Fix your token-request mechanism. The SDK tried to obtain a token from your authUrl or authCallback and the attempt failed, so inspect the error's cause field for the underlying reason and check that your auth endpoint is reachable and returns a valid token. A 403 from your endpoint fails the connection, so make sure it doesn't reject valid clients.

Why it happens

Obtaining a token through the configured authUrl or authCallback failed, so the connection could not authenticate. Common causes are the endpoint being unreachable, timing out, returning an error status, or returning something that isn't a valid token or token request.

What you'll see

The error is reported with code 80019, with HTTP status 401, or 403 when your endpoint responds 403. The message is typically Client configured authentication provider request failed, and the underlying error is attached as the cause.