Accounts logout

Open in

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 logout

Log out from a specific account by alias:

ably accounts logout work

Log out from a specific account by ID:

ably accounts logout VgQpOZ

Log out without confirmation:

ably accounts logout --force

Log out and output the result in JSON format:

ably accounts logout --json

Log out and output the result in formatted JSON:

ably accounts logout --pretty-json

See also

  • Accounts — Explore all ably accounts commands.
  • CLI reference — Full list of available commands.