v46

latestOpenAPI 3.0.0MITraw.githubusercontent.com2026-08-0311978417.1 KB
Private Authentication

Exchange code or refresh token

Exchanges an authorization code or refresh token for access tokens via WorkOS.

post/api/workos/authenticate

Request body

codestring
grant_type'refresh_token'
refresh_tokenstring
code_verifierstring

Response

Authentication result with tokens

accessTokenstring
refreshTokenstring
userobject
expiresIninteger

Token expiry in seconds

expirationDateinteger

Token expiry date in milliseconds