OpenID4VCI Protocol
Token endpoint (pre-authorized_code grant)
OpenID4VCI token endpoint. Implements the pre-authorized_code grant only: the wallet exchanges the pre-authorized_code from a credential offer (and the transaction code if the offer required one) for a short-lived Bearer access token used at the credential endpoint. Public and unauthenticated (the pre-authorized_code itself is the capability). The token is single-use and expires in 300 seconds. tx_code is brute-force protected — after 5 failed attempts the offer locks out. The grant fails (HTTP 400 invalid_grant) if the code is unknown, already redeemed, expired, or the tx_code is wrong; an unsupported grant_type returns 400 unsupported_grant_type.
post/v1/oauth/token
Request body
Example request
{
"grant_type": "urn:ietf:params:oauth:grant-type:pre-authorized_code",
"pre-authorized_code": "s8Ilre7v2K9pQx1bN4mZ",
"tx_code": "517082"
}Response
Access token issued.
Example response
{
"access_token": "5a0W4gQ2tR8yU1vC7pLxZ3mB6nK9dF0",
"token_type": "bearer",
"expires_in": 300
}