40106: No valid authentication method provided
no_valid_authentication_method_providedThe Ably SDK was given no usable way to authenticate: no API key, token, or token-request mechanism such as authCallback or authUrl was provided.
What you should do
Configure the client with a way to authenticate. Set one of key, token, authUrl, or authCallback in the client options. For browser and mobile clients prefer authUrl or authCallback; for server-side use an API key.
Why it happens
The SDK was instantiated without any usable authentication option, so it had no API key, no token, and no means to obtain one. This is a configuration error raised by the SDK before it contacts Ably.
What you'll see
The error is reported with code 40106 and HTTP status 401. The message is typically No authentication options provided or authOptions must include valid authentication parameters.