Use the ably accounts logout command to log out from an Ably account. By default, this logs out from the current account and prompts for confirmation. For OAuth accounts, the CLI also revokes the stored access and refresh tokens with the Ably authorization server.
Synopsis
ably accounts logout [account-alias-or-id] [options]Arguments
account-alias-or-id
An optional account alias or ID to log out from. If not provided, the CLI logs out from the current account.
Options
--force | -f
Skip the confirmation prompt and log out immediately. Required when using --json.
--json
Output results as compact JSON. Mutually exclusive with --pretty-json.
--pretty-json
Output results in formatted JSON. Mutually exclusive with --json.
--verbose | -v
Enable verbose logging. Can be combined with --json or --pretty-json.
Examples
Log out from the current account:
ably accounts logoutLog out from a specific account by alias:
ably accounts logout workLog out from a specific account by ID:
ably accounts logout VgQpOZLog out without confirmation:
ably accounts logout --forceLog out and output the result in JSON format:
ably accounts logout --jsonLog out and output the result in formatted JSON:
ably accounts logout --pretty-jsonSee also
- Accounts — Explore all
ably accountscommands. - CLI reference — Full list of available commands.