openclaw - 💡(How to fix) Fix auth-profiles.json: `type: "token"` breaks Anthropic Enterprise accounts (529 errors) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#74297Fetched 2026-04-30 06:25:59
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
2
Timeline (top)
subscribed ×5cross-referenced ×2commented ×1mentioned ×1

When ~/.openclaw/agents/main/agent/auth-profiles.json contains:

{
  "anthropic:default": {
    "type": "token",
    "token": "sk-ant-..."
  }
}

OpenClaw triggers a cascade of 529 errors from Anthropic (Authentication service is temporarily unavailable. Retry the request.).

The account is valid and working via direct curl with x-api-key, but the type: "token" auth path fails consistently.

Error Message

OpenClaw should detect Enterprise API accounts and auto-configure type: "api_key", OR documentation should clearly warn against using type: "token" for Enterprise accounts. Gateway accepts type: "token" configuration and enters a 529 error loop.

Root Cause

The type: "token" mode sends the credential via a different auth route than the standard x-api-key header. Anthropic Enterprise accounts (API-only, no OAuth) should use type: "api_key".

Fix Action

Fix

Change to:

{
  "anthropic:default": {
    "type": "api_key",
    "key": "sk-ant-..."
  }
}

Curl direct test with x-api-key from the same host → HTTP 200 (key valid).

Workaround

Before any migration/DR scenario, verify:

cat ~/.openclaw/agents/main/agent/auth-profiles.json | jq '."anthropic:default".type'
# Must show: "api_key"

Code Example

{
  "anthropic:default": {
    "type": "token",
    "token": "sk-ant-..."
  }
}

---

{
  "anthropic:default": {
    "type": "api_key",
    "key": "sk-ant-..."
  }
}

---

cat ~/.openclaw/agents/main/agent/auth-profiles.json | jq '."anthropic:default".type'
# Must show: "api_key"
RAW_BUFFERClick to expand / collapse

auth-profiles.json: type: "token" breaks Anthropic Enterprise accounts (529 errors)

Environment

  • OpenClaw Version: 2026.4.25
  • Provider: Anthropic (Enterprise API account)
  • OS: Ubuntu 24.04 LTS

Summary

When ~/.openclaw/agents/main/agent/auth-profiles.json contains:

{
  "anthropic:default": {
    "type": "token",
    "token": "sk-ant-..."
  }
}

OpenClaw triggers a cascade of 529 errors from Anthropic (Authentication service is temporarily unavailable. Retry the request.).

The account is valid and working via direct curl with x-api-key, but the type: "token" auth path fails consistently.

Root Cause

The type: "token" mode sends the credential via a different auth route than the standard x-api-key header. Anthropic Enterprise accounts (API-only, no OAuth) should use type: "api_key".

Steps to Reproduce

  1. Configure auth-profiles.json with type: "token" for Anthropic
  2. Restart gateway
  3. Attempt any Anthropic API call (e.g., a cron job with Opus/Sonnet)
  4. Observe 529 errors in logs

Expected Behavior

OpenClaw should detect Enterprise API accounts and auto-configure type: "api_key", OR documentation should clearly warn against using type: "token" for Enterprise accounts.

Actual Behavior

Gateway accepts type: "token" configuration and enters a 529 error loop.

Fix

Change to:

{
  "anthropic:default": {
    "type": "api_key",
    "key": "sk-ant-..."
  }
}

Curl direct test with x-api-key from the same host → HTTP 200 (key valid).

Impact

This caused a failed cutover during a BLUE/GREEN VPS migration (2026-04-28). The new environment (GREEN) was non-functional until the auth-profiles.json was corrected.

Workaround

Before any migration/DR scenario, verify:

cat ~/.openclaw/agents/main/agent/auth-profiles.json | jq '."anthropic:default".type'
# Must show: "api_key"

Request

  1. Validate type: "token" for Anthropic Enterprise accounts or remove it from schema
  2. Add a diagnostic warning when type: "token" is detected with Enterprise keys
  3. Document the difference between type: "token" and type: "api_key" in auth configuration docs

Evidence: Production incident during VPS migration (2026-04-28), documented in docs/dr/migration-lessons-2026-04-28.md

extent analysis

TL;DR

Change the type in auth-profiles.json from "token" to "api_key" for Anthropic Enterprise accounts to resolve the 529 error issue.

Guidance

  • Verify that the Anthropic account is an Enterprise account and requires the type: "api_key" configuration.
  • Update the auth-profiles.json file to use type: "api_key" instead of type: "token" for the Anthropic Enterprise account.
  • Test the configuration by running a curl command with the x-api-key header to ensure the key is valid.
  • Before any migration or disaster recovery scenario, verify the auth-profiles.json configuration to prevent similar issues.

Example

{
  "anthropic:default": {
    "type": "api_key",
    "key": "sk-ant-..."
  }
}

Notes

This fix assumes that the Anthropic Enterprise account requires the type: "api_key" configuration. If the account type is not Enterprise, the type: "token" configuration may still be valid.

Recommendation

Apply the workaround by changing the type to "api_key" in the auth-profiles.json file, as this resolves the 529 error issue for Anthropic Enterprise accounts.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix auth-profiles.json: `type: "token"` breaks Anthropic Enterprise accounts (529 errors) [1 comments, 2 participants]