Transient 400 error with Max subscription credential: 'only authorized for use with Claude Code'

Resolved 💬 2 comments Opened Feb 8, 2026 by improvingjef Closed Mar 9, 2026

Description

When using Claude Code with a Claude Max subscription (OAuth credential, no API key set), I intermittently receive 400 errors on all requests:

API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"This credential is only authorized for use with Claude Code and cannot be used for other API requests."}}

The error occurs on every request until it eventually resolves on its own. This has happened more than once.

Environment

  • Claude Code: latest version
  • Auth: Claude Max subscription (OAuth login, no ANTHROPIC_API_KEY set)
  • Platform: macOS (Darwin 24.3.0)

Steps to Reproduce

Not reliably reproducible — appears to be a transient server-side issue with credential validation.

Expected Behavior

The Max subscription OAuth credential should be accepted for Claude Code requests without intermittent failures.

Actual Behavior

All requests fail with the 400 error above until the issue resolves on its own. The error message is confusing because the credential is a Claude Code credential — it's being rejected despite being the correct type.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗