> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # InvalidCredentialsError > Thrown when the SDK is rejected by the auth backend. Raised when the auth backend rejects the credentials returned by the configured [`CredentialProvider`](/docs/browser-sdk/v4/reference/interfaces/credential-provider) — for example, an expired SAT, a revoked embed token, or a payload that fails schema validation. The `reason` property carries the server-reported cause when available. ## **Extends** * `Error` ## **Constructors** ### Constructor ```ts new InvalidCredentialsError(reason?, options?): InvalidCredentialsError ``` ### Parameters **`reason`** `string` Reason the auth backend rejected the credentials. --- **`options`** `ErrorOptions` Standard `ErrorOptions` (e.g. `cause`). --- ## **Properties** **`reason`** `string` — required Reason the auth backend rejected the credentials. --- ## **Examples** ```ts import { InvalidCredentialsError } from '@signalwire/js'; try { await client.connect(); } catch (err) { if (err instanceof InvalidCredentialsError) { console.error('auth rejected:', err.reason); await refreshCredentialProvider(); } } ``` > Thrown when the SDK is rejected by the auth backend.