Released docs. You are viewing the documentation published with v0.46.0. Development docs are available at Latest.
Redeem one Draft 13 pre-authorized code anonymously
const url = 'https://example.com/protocol/oid4vci/draft-13/token';const options = { method: 'POST', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, body: new URLSearchParams({ grant_type: 'urn:ietf:params:oauth:grant-type:pre-authorized_code', 'pre-authorized_code': 'example', tx_code: 'example' })};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/protocol/oid4vci/draft-13/token \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data grant_type=urn:ietf:params:oauth:grant-type:pre-authorized_code \ --data pre-authorized_code=example \ --data tx_code=exampleRequest Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Single-use access token and c_nonce
object
Example
{ "token_type": "bearer"}Headers
Section titled “Headers”The form cannot be decoded, or the grant or code was refused
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”The configured request deadline elapsed
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”The request body exceeds the configured byte limit
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”The request is not form encoded
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”The request budget is spent; retry after the interval in Retry-After
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”The bounded state store is unavailable
object
Example
{ "error": "invalid_request"}Headers
Section titled “Headers”Cookies on Registry Stack
We use optional cookies to understand how you use the main Registry Stack website and this documentation. If you contact us, we may link this activity to your enquiry. You can change your choice at any time. Read the privacy policy.
Your browser asks sites not to track you, so optional tracking stays off.
We could not use or save that choice. Optional tracking remains off.