#Question about OpenClaw + Anthropic authentication

1 messages Β· Page 1 of 1 (latest)

torn gulch
#

Hi everyone, I wanted to ask whether OpenClaw can still be used with Anthropic via token authentication, or if that method has already been blocked/banned and the only supported option now is using an API key.

I’m asking because I have tokens configured and detected correctly in OpenClaw, but when making requests I get HTTP 401: authentication_error: Invalid bearer token. I’d like to confirm whether this is just a configuration issue on my side, or if Anthropic no longer allows that authentication method and now only works with API keys.

If anyone has it working right now, it would really help to know which authentication method you’re using

granite forumBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

autumn vigilBOT
#

Short answer: it’s still supported β€” Anthropic token-based auth (setup-token / Claude CLI reuse) has not been removed in OpenClaw.
API key is just the more stable/recommended path for always-on setups.

Your exact error (401 authentication_error: Invalid bearer token) usually means the token is expired/revoked or OpenClaw is trying a stale profile.

Quick checks (on the gateway host):

openclaw --version
openclaw models status
openclaw models status --probe
openclaw models auth order get --provider anthropic

If token auth is broken, fastest fixes:

  1. Re-login Anthropic auth:
torn gulch
#

Auth overview
Auth store : ~/.openclaw/agents/main/agent/auth-profiles.json
Shell env : off
Providers w/ OAuth/tokens (1): anthropic (4)

  • anthropic effective=profiles:~/.openclaw/agents/main/agent/auth-profiles.json | profiles=4 (oauth=0, token=4, api_key=0) | anthropic:juanvm2=token:sk-ant-o...alpZQlac, anthropic:manual=token:sk-ant-o...vHZmabu5, anthropic:default=token:sk-ant-o...cfA-kZLQ, anthropic:nuevo-token-antro=token:sk-ant-o...2E0ZQwAA

OAuth/token status

  • anthropic
    • anthropic:default static
    • anthropic:juanvm2 static
    • anthropic:manual static
    • anthropic:nuevo-token-antro static

Auth probes
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Model β”‚ Profile β”‚ Status β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ anthropic/claude-sonnet- β”‚ anthropic:default (token) β”‚ ok Β· 1.8s β”‚
β”‚ 4-5-20250929 β”‚ β”‚ β”‚
β”‚ anthropic/claude-sonnet- β”‚ anthropic:juanvm2 (token) β”‚ ok Β· 2.9s β”‚
β”‚ 4-5-20250929 β”‚ β”‚ β”‚
β”‚ anthropic/claude-sonnet- β”‚ anthropic:manual (token) β”‚ ok Β· 3.3s β”‚
β”‚ 4-5-20250929 β”‚ β”‚ β”‚
β”‚ anthropic/claude-sonnet- β”‚ anthropic:nuevo-token- β”‚ unknown Β· - β”‚
β”‚ 4-5-20250929 β”‚ antro (token) β”‚ ↳ Excluded by auth.order for this provider. β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Probed 3 targets in 12.6s

autumn vigilBOT
#

Nice β€” this output is super useful. It shows token auth is working on your setup right now.

Key signal: your probes returned ok for 3 Anthropic token profiles, so this is not a global Anthropic ban/block of token auth.

The likely issue is profile selection/order:

  • anthropic:nuevo-token-antro is currently excluded by auth.order
  • if your session is pinned to that profile (or expecting it), you can still hit 401 paths

Try this:

openclaw models auth order clear --provider anthropic
openclaw models status --probe

Or set explicit order to only known-good profiles: