Claude Platform Docs
AdminClaude Platform OAuth

Claude Platform OAuth

Where to start with Claude Platform OAuth and Linked billing, and how a customer’s approval reaches your back end.

Claude Platform OAuth is how a customer approves your product to use their Claude organization. It powers Linked billing, which lets your customers pay for the Claude usage in your product through their own Claude organization. To call Claude for your own product with your organization’s credentials, you don’t need an OAuth app: see Authentication.

To offer Linked billing, you need an OAuth app and an identity provider that issues tokens to your back end. Your customers need a Claude organization that pays Anthropic directly: see Eligible customers.

How it works

A customer approves your app once. That creates a connection, which ties their Claude organization to your app until they or you end it.

A user at your customer’s company clicks the Link your Claude organization button in your product. Your back end sends them to Claude’s approval page on auth.claude.com. If they have the Admin or Billing role in the customer’s organization, they approve your app, and the browser comes back with a one-time code. Your back end exchanges the code for the connection’s ID and OAuth tokens. After that, Anthropic can bill the customer’s organization for requests that your back end makes for them.

Three participants side by side: the customer's browser, your back end, and auth.claude.com, with time running down. The person clicks the link button, and the browser sends the click to your back end. Your back end redirects the browser to Claude's approval page. In the browser, the person signs in to auth.claude.com and approves your app. Then, auth.claude.com redirects the browser back with a one-time code, and the browser delivers the code to your back end. Your back end sends the code to auth.claude.com in the code exchange and gets back the connection ID and OAuth tokens.
Customer’s browser
Your back end
auth.claude.com
Clicks the link button
Redirects to Claude’s approval page
Signs in and approves your app
Redirects back with a one-time code
Delivers the code
Exchanges the code
Connection ID and OAuth tokens

Someone without either role can’t approve: see What your customers see. If you know OAuth, this is the authorization code flow with PKCE.

Your OAuth app

Your OAuth app is your product’s registration with Anthropic. An Admin of your Claude organization creates it in the Claude Console, and it gives your product a client ID. On the approval page, customers see its name, its logo, and what it asks for.

An identity provider instead of a client secret

Every request that your back end sends to auth.claude.com carries a token from your identity provider, through Workload Identity Federation. Anthropic doesn’t issue client secrets for OAuth apps. Any OpenID Connect issuer works, and there are guides for common identity providers.

Choose your path

Start with the task you have now. To build an integration, set up your app, link and bill a test customer, and then test and publish your app. Until your app is live, only its test users can link it, so first add your test customer’s approver.

Decide whether Linked billing fits your product and your customers

Register your app, then go on to link and bill a customer

Support a linked customer, check whether they’re still linked, or link them again

Fix an error that linking or billing returns

For product and support teams: the approval page, spend caps, and emails that your customers see

Look up an exact endpoint, parameter, scope, OAuth token field, or error

Was this page helpful?