Skip to content

doto auth

Manage authentication and API keys.


doto auth login

Save an API key and verify it against the server.

bash
doto auth login --api-key <key> [--server <url>]

Flags

FlagRequiredDescription
--api-key <key>Your API key (doto_...)
--server <url>Override server URL and save it

Example

bash
doto auth login --api-key doto_abc123... --server http://localhost:3000
# ✓ Logged in as you@example.com

doto auth logout

Remove the saved API key from the config file.

bash
doto auth logout

doto auth whoami

Show the currently authenticated user.

If no API key is saved, the CLI reports that you are not authenticated. If a saved API key has been revoked or no longer matches a user on the server, the CLI tells you the saved key is no longer valid and prompts you to log in again.

bash
doto auth whoami [--json]

Example

bash
doto auth whoami
#   ID     abc123...
#   Email  you@example.com
#   Name   Your Name

doto auth whoami --json
# { "data": { "id": "...", "email": "...", "name": "..." } }

doto auth keys list

List your active API keys, newest first. Shows the full Key ID (required for revocation) and the secret's prefix.

bash
doto auth keys list [--json]

doto auth keys create

Create a new API key. The full key is shown once — save it immediately.

bash
doto auth keys create [--name <name>]

Flags

FlagDescription
--name <name>Label for the key (default: New Key)

Example

bash
doto auth keys create --name "CI Bot"
# ✓ API key created: doto_xxxxxxxx...
# Save this key — it will not be shown again.

doto auth keys revoke

Revoke an API key by its ID. The key stops working immediately.

bash
doto auth keys revoke <id>

Example

bash
doto auth keys revoke 550e8400-e29b-41d4-a716-446655440000
# ✓ API key revoked

Released under the MIT License.