40131: API key revoked
key_revokedA connection or request was rejected because the API key it used has been revoked by an account admin and can no longer authenticate.
What you should do
Move the client onto a different, valid credential. If you administer the account, select another active API key in the Ably dashboard or create a new one; if the client uses token authentication, issue its tokens from that key instead. If you don't administer the account, ask an admin to do this and to provide the key or a token request generated from it.
If the revocation was unexpected, find out why the key was revoked. It may have been revoked deliberately because it was compromised, rather than in error.
Why it happens
An account admin revoked the key in the Ably dashboard, commonly because it was compromised, rotated out, or belonged to a decommissioned service. From that point on, any client still configured with the key is rejected, whether it authenticates with the key directly or uses it to request tokens.
What you'll see
The error is reported with code 40131 and HTTP status 401. The message is typically key/token status changed (revoke).