auth_oauthToken
Exchange an authorization code and PKCE verifier, or a refresh token, for a short-lived agent access token and a new refresh token. Refresh tokens rotate: each works once, and reusing one revokes the whole chain. With grant_type urn:workos:agent-auth:grant-type:claim and your claim_token (auth.md), poll every interval only while the error is authorization_pending. slow_down means wait longer and poll again. access_denied, expired_token, and invalid_grant end this claim. Also stop when expires_in has passed. shown_once is only on success. Success hands over a named agent key once (no refresh token, it does not expire until revoked).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| scope | No | ||
| resource | No | ||
| client_id | No | ||
| grant_type | Yes | ||
| claim_token | No | ||
| redirect_uri | No | ||
| code_verifier | No | ||
| refresh_token | No |