Step 1: Remove the API key profile
# Check what profiles exist
openclaw models status
His status showed profiles=2 (oauth=0, token=1, api_key=1). He needs to remove the API key so it doesn't interfere:
# Edit the auth profiles directly
nano ~/.openclaw/agents/main/agent/auth-profiles.json
Delete the anthropic:default (api_key) entry, keep only the anthropic:manual (token) entry.
Step 2: If the setup-token has expired, re-generate it
claude setup-token
Then paste it:
openclaw models auth setup-token --provider anthropic
Step 3: Set auth order to only use the token
openclaw models auth order set --provider anthropic anthropic:manual
Step 4: Verify
openclaw models status
Should show profiles=1 (token=1) with status static.
Step 5: Restart gateway
pkill -9 -f openclaw-gateway || true; nohup openclaw gateway run --bind loopback --port 18789 --force > /tmp/openclaw-gateway.log 2>&1 &
Step 6: Test the bot
Send a message in Telegram and watch logs:
openclaw logs --follow