Oauth
Exchange an identity token for an access token (the RFC 7523 jwt-bearer grant).
The identity token must match the federation rule federation_rule_id names and verify against its issuer: one on federation_issuers for an operator's rule, the one the rule names for a member's. organization_id, where set, must be the UUID of the rule's key's organization. workspace_id and service_account_id are accepted and ignored, so a client configured for Anthropic needs only its rule and organization changed. The access token authenticates as that key until expires_in runs out, the rule is deleted or the key stops passing its checks.
Every refusal of the identity token answers 401 invalid_grant with the same description.
Enter your API key here (sent as Otari-Key header).
An RFC 7523 jwt-bearer token request, as the Anthropic SDKs and Claude Code send it.
Every field is optional here so that a missing one is answered in the RFC 6749 error shape rather than as a validation error. Fields the request does not use are ignored.
The identity token.
The id of the federation rule the identity token must match.
urn:ietf:params:oauth:grant-type:jwt-bearer
When set, the UUID of the organization of the rule's key.
Ignored. Accepted so that a client configured for Anthropic's service account id is not refused.
Ignored. Accepted so that a client configured for Anthropic's workspace id is not refused.
Successful Response
An access token, as RFC 6749 section 5.1 shapes it. Present it as a bearer token in place of the key.
Seconds until the access token expires.
Bearerinvalid_request or unsupported_grant_type
invalid_grant
Validation Error
temporarily_unavailable
POST /api/v1/oauth/token HTTP/1.1
Otari-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 208
{
"assertion": "<identity token>",
"federation_rule_id": "7d0c7a52-9a2e-4b55-8f3a-2f1f6c0d2a11",
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"organization_id": "5b3f8e0e-1c2d-4e7f-9a8b-0c1d2e3f4a5b"
}{
"access_token": "text",
"expires_in": 1,
"token_type": "Bearer"
}Last updated
Was this helpful?
