---
title: "OIDC Credential"
method: POST
path: "/oidc/credential"
tags: ["oidc4ci"]
---

# OIDC Credential

`POST /oidc/credential`

Issues credentials in exchange for an authorization token.

## Request body

- CredentialRequest — Model for OIDC Credential request.
  - `format` string — Format of the credential being issued.
  - `credential_definition` CredentialDefinition — unresolved $ref
  - `credential_identifier` string — String that identifies a Credential that is being requested to be issued. When this parameter is used, the format parameter and any other Credential format specific parameters MUST NOT be present.
  - `proof` JWTProof
    - `proof_type` string, required — REQUIRED. JSON String denoting the proof type. Currently the only supported proof type is 'jwt'.
    - `jwt` string — REQUIRED if proof_type equals jwt. Signed JWT as proof of key possession.
    - `cwt` string — REQUIRED if proof_type equals cwt. Signed CWT as proof of key possession.
    - `ldp_vp` object, nullable — REQUIRED if proof_type equals ldp_vp. Linked Data Proof as proof of key possession.
  - `credential_response_encryption` CredentialResponseEncryption — Object containing information for encrypting the Credential Response.
    - `jwk` string, required — Object containing a single public key as a JWK used for encrypting the Credential Response.
    - `alg` string, required — JWE alg algorithm for encrypting the Credential Response.
    - `enc` string, required — JWE enc algorithm for encrypting the Credential Response.

## Response `200`

OK

- CredentialResponse — Model for OIDC Credential response.
  - `credential` union, required — Credential value. According to draft 13 spec.
    - string
    - object
  - `credentials` CredentialResponseCredentialObject[], required — Contains an array of one or more issued Credentials. According to editor-draft spec. — unresolved $ref
  - `transaction_id` string — A JSON string containing a token subsequently used to obtain a Credential. MUST be present when credential is not returned.
  - `c_nonce` string — JSON string containing a nonce to be used to create a proof of possession of key material when requesting a Credential. According to draft 13 spec.
  - `c_nonce_expires_in` integer — JSON integer denoting the lifetime in seconds of the c_nonce. According to draft 13 spec.
  - `notification_id` string, required — String identifying one or more Credentials issued in one Credential Response.

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/trustbloc/apis/verifiable-credential-service-vcs.md) · [All operations](https://skmtc.net/trustbloc/apis/verifiable-credential-service-vcs/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trustbloc/verifiable-credential-service-vcs/revisions/9e21ad997121/schema)
