Authentication
Clawdbot supports OAuth and API keys for model providers. For Anthropic subscription accounts, the most stable path is to reuse Claude Code OAuth credentials, including the 1‑year token created byclaude setup-token.
See /concepts/oauth for the full OAuth flow and storage
layout.
Preferred Anthropic setup (Claude CLI setup-token)
For Anthropic, the preferred path is the Claude CLI setup-token, not an API key. Run it on the gateway host:auth-profiles.json + updates config):
Recommended: long‑lived Claude Code token
Run this on the gateway host (the machine running the Gateway):1 when expired/missing, 2 when expiring):
clawdbot models status loads Claude Code credentials into Clawdbot’s
auth-profiles.json and shows expiry (warns within 24h by default).
clawdbot doctor also performs the sync when it runs.
claude setup-token requires an interactive TTY.
Checking model auth status
Controlling which credential is used
Per-session (chat command)
Use/model <alias-or-id>@<profileId> to pin a specific provider credential for the current session (example profile ids: anthropic:claude-cli, anthropic:default). Use /model status to see candidates + which one is next.
Per-agent (CLI override)
Set an explicit auth profile order override for an agent (stored in that agent’sauth-profiles.json):
--agent <id> to target a specific agent; omit it to use the configured default agent.
How sync works
- Claude Code stores credentials in
~/.claude/.credentials.json(or Keychain on macOS). - Clawdbot syncs those into
~/.clawdbot/agents/<agentId>/agent/auth-profiles.jsonwhen the auth store is loaded. - Refreshable OAuth profiles can be refreshed automatically on use. Static token profiles (including Claude CLI setup-token) are not refreshable by Clawdbot.
Troubleshooting
“No credentials found”
If the Anthropic token profile is missing, runclaude setup-token on the
gateway host, then re-check:
Token expiring/expired
Runclawdbot models status to confirm which profile is expiring. If the profile
is anthropic:claude-cli, rerun claude setup-token.
Requirements
- Claude Max or Pro subscription (for
claude setup-token) - Claude Code CLI installed (
claudecommand available)