v46

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-211591,0051.4 MB
Client Auth

Exchange grant for access token

OAuth 2.0 token endpoint supporting three grant types: authorization_code (standard OAuth flow with Basic auth), urn:ietf:params:oauth:grant-type:device_code (RFC 8628 device authorization for CLI clients), and refresh_token (rotate refresh token and obtain a new access token). The device_code and refresh_token grants authenticate via the privy-app-id header.

post/api/oauth/v2/token

Headers

privy-app-idstring

ID of your Privy app.

Request body

OR
OR

Response

Token issued successfully.

access_tokenstring required

The issued access token.

expires_innumber

The lifetime in seconds of the access token.

refresh_tokenstring

A refresh token for obtaining new access tokens. Issued for device_code and refresh_token grants.

token_type'Bearer' required

The type of token issued.