---
title: "Token endpoint (pre-authorized_code grant)"
method: POST
path: "/v1/oauth/token"
tags: ["OpenID4VCI Protocol"]
---

# Token endpoint (pre-authorized_code grant)

`POST /v1/oauth/token`

Exchange an OpenID4VCI (OpenID for Verifiable Credential Issuance) pre-authorized code for an issuance access token. Send the transaction code when the offer requires one. Use the returned token at the credential endpoint.

## Request body

- object
  - `grant_type` string, required — Send the pre-authorized code grant type.
  - `pre-authorized_code` string, required — Send the pre-authorized code from the credential offer.
  - `tx_code` string — Send the transaction code when the credential offer requires one.

## Response `200`

Didit issued a short-lived access token for credential issuance.

- object
  - `access_token` string — Send this token as the bearer token when you call the credential endpoint.
  - `expires_in` integer — You receive the access-token lifetime in seconds.
  - `token_type` string — You receive the token type for the access token.

## Other responses

- `400` — Grant rejected — unsupported grant_type, or an invalid/expired/already-redeemed pre-authorized_code, or a wrong/exceeded tx_code.

---

[API](https://skmtc.net/didit-protocol/apis/didit-credentials-api.md) · [All operations](https://skmtc.net/didit-protocol/apis/didit-credentials-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/didit-protocol/didit-credentials-api/revisions/e4eddba66557/schema)
