# `ClaudeAgentSDK.Auth.Providers.Anthropic`
[🔗](https://github.com/nshkrdotcom/claude_agent_sdk/blob/v0.21.0/lib/claude_agent_sdk/auth/providers/anthropic.ex#L1)

Anthropic-specific authentication via `claude setup-token`.

# `oauth_env_var`

```elixir
@spec oauth_env_var() :: String.t()
```

Returns the environment variable name for Claude OAuth tokens.

## Examples

    iex> ClaudeAgentSDK.Auth.Providers.Anthropic.oauth_env_var()
    "CLAUDE_AGENT_OAUTH_TOKEN"

# `setup_token`

```elixir
@spec setup_token() :: {:ok, String.t(), DateTime.t()} | {:error, term()}
```

Guides user through obtaining an OAuth token via `claude setup-token`.

The Claude CLI requires an interactive TTY, so this function prompts
the user to run `claude setup-token` in a separate terminal and paste
the resulting token.

## Requirements

- Claude Code CLI installed (v2.0.10+)
- Active Claude subscription

## Token Format

Accepts OAuth tokens (sk-ant-oat01-...) or API keys (sk-ant-api03-...).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
