v13

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-022830130.4 KB
Agent Auth

Approve Agent Authorization

Called by the frontend after the user signs in.

Verifies the identity token, creates or looks up the user's API key, and stores it against the token for the agent to poll via GET /v1/agent-auth/token/{token}.

This endpoint is called by the browser, not by agents directly.

post/v1/agent-auth/token/{token}/approve

Path parameters

tokenstring required
Example:a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6a7b8c9d0e1f2a3b4c5d6a7b8c9d0e1f2

The token the agent generated and included in the approval URL. Must be 16-128 characters.

Request body

id_tokenstring required

Identity token obtained after the user signs in on the approval page

client_namestring

Name of the agent/application (stored in customer metadata for audit)

Example request

{
  "client_name": "Claude Code"
}

Response

Authorization approved. The API key is now available for the agent to poll.

statusstring
emailstring

Example response

{
  "status": "approved",
  "email": "user@example.com"
}