Is it possible for the SDK to use CLAUDE_CODE_OAUTH_TOKEN

Resolved 💬 7 comments Opened Aug 25, 2025 by vikasprogrammer Closed Jan 9, 2026

I am using Typescript SDK but if I use long lived token from my max plan, it says - Invalid API key · Fix external API key

I tried setting both CLAUDE_CODE_OAUTH_TOKEN or ANTHROPIC_API_KEY key with the long lived key, but still it doesn't work.

Does the SDK only work with a regular API key? Can't it use my max plan's key?

View original on GitHub ↗

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