[BUG] API Error 400 - "credential only authorized for Claude Code" appears INSIDE Claude Code

Resolved 💬 3 comments Opened Feb 10, 2026 by a-hallyne Closed Feb 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

While using Claude Code normally (not making external API calls), I receive:

This error doesn't make sense because I AM using Claude Code - not making external API calls.

What Should Happen?

Claude Code should work without credential errors since I'm using it within Claude Code itself.

Error Messages/Logs

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."}}

Steps to Reproduce

  1. Using Claude Code normally
  2. Error appears intermittently during regular usage

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude 1.1.2321 (495628) 2026-02-06T22:01:17.000Z

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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