Request credential via OID4VCI
POST/api/management/issuance/request/oid4vci
Requests a new credential via the OpenID 4 Verifiable Credential Issuance protocol.
Request
- application/json
Bodyrequired
issuerUrlstringrequired
Example:
https://issuer.example.com
preAuthorizedCodestring
Example:
pre-auth-code-xyz
authorized object
Responses
- 200
- 403
- application/json
- Schema
- Example (auto)
Schema
idstringrequired
Unique identifier of the credential record
Example:
b86483f3-3792-4a54-b11e-f1c6face9935
targetDidstringrequired
Target decentralized identifier
Example:
did:example:456
credential object
selfIssuedbooleanrequired
If the credential is self issued
Example:
true
revokedbooleanrequired
Indicates if the credential has been revoked
Example:
false
statusListIndexnumber
Optional status list index
Example:
0
createdDatedate-timerequired
Creation timestamp
Example:
2023-10-01T00:00:00Z
modifiedDatedate-timerequired
Modification timestamp
Example:
2023-10-02T00:00:00Z
deletedDatedate-time
Optional deletion timestamp
Example:
2023-10-03T00:00:00Z
{
"id": "b86483f3-3792-4a54-b11e-f1c6face9935",
"targetDid": "did:example:456",
"credential": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiableCredential",
"DataSpaceCredential"
],
"issuer": "did:example:issuer",
"issuanceDate": "2023-10-01T00:00:00Z",
"credentialSubject": {
"id": "did:example:subject"
}
},
"selfIssued": true,
"revoked": false,
"statusListIndex": 0,
"createdDate": "2023-10-01T00:00:00Z",
"modifiedDate": "2023-10-02T00:00:00Z",
"deletedDate": "2023-10-03T00:00:00Z"
}
Forbidden
- application/json
- Schema
- Example (auto)
Schema
namestringrequired
Example:
ResourceNotFound
statusstringrequired
Example:
404 Not Found
codenumberrequired
Example:
404
messageobject
Example:
The requested resource does not exist.
errorstring
Example:
Not Found
{
"name": "ResourceNotFound",
"status": "404 Not Found",
"code": 404,
"message": "The requested resource does not exist.",
"error": "Not Found"
}
- curl
- http
- CURL
curl -L 'https://tsg.dataspac.es/api/management/issuance/request/oid4vci' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"issuerUrl": "https://issuer.example.com",
"preAuthorizedCode": "pre-auth-code-xyz",
"authorized": {
"accessToken": "access-token",
"credentialIdentifier": "credential-type",
"additionalRequestParams": {}
}
}'