Use the ably auth command group to manage authentication, API keys, and tokens. These commands enable you to issue and revoke tokens, and manage API keys for your apps.
Token management commands
Use the following commands to issue and revoke Ably tokens and JWTs. Tokens provide short-lived, scopeable access for client-side authentication:
| Command | Description |
|---|---|
ably auth issue-ably-token | Create an Ably Token with specified capabilities. |
ably auth issue-jwt-token | Create an Ably JWT token with specified capabilities. |
ably auth revoke-token | Revoke Ably tokens by client ID or revocation key. |
Key management commands
Use the following commands to manage API keys for your Ably apps. API keys control access to your account's resources through configurable capabilities such as publish, subscribe, and history:
| Command | Description |
|---|---|
ably auth keys create | Create a new API key for an app. |
ably auth keys current | Show the current API key for the selected app. |
ably auth keys get | Get details for a specific API key. |
ably auth keys list | List all API keys for an app. |
ably auth keys revoke | Permanently revoke an API key. |
ably auth keys switch | Switch to a different API key for the current app. |
ably auth keys update | Update an API key's properties. |
See also
- CLI reference — Full list of available commands.