Verifiable presentation verification
#
Verify a signed “Verifiable Presentation”
#
The VP verification API validates a Verifiable Presentation of an ATP Credential in JWT format created by the VP generation API.
Request
#
Method
#
Request method | Endpoint |
---|
POST | /api/v1/verifiablePresentation/verify |
Authentication
Please see Obtaining and using a Token for a detailed description of how to authenticate yourself with our API.
Name | Value |
---|
Content-Type | application/json |
Authorization | Bearer [token] |
Body
#
Example request body
{
"verifiablePresentation": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImRpZDpleGFtcGxlOjB [...]",
"verifierDID": "did:ethr:example"
}
Key | Description | Type | Required |
---|
verifiablePresentation | The JWT-formatted and base64-encoded Verifiable Presentation. | base64 \ string | ✅ |
verifierDID | The DID belonging to the entity verifying the incoming Verifiable Presentation. | string | ✅ |
Refer to our VRS FAQ to understand how to extract details from the Verifiable Presentation.
Response
#
Successful Response
#
{
"success": true,
"verifiablePresentation": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImRpZDpleGFtcGxlOmFiZmUxM2Y3MTIxMjA0[...]",
"message": "Verification succeeded"
}
Fields
#
Response Field | Description | Type | Values |
---|
success | Boolean value indicating whether or not the request was successful. | Boolean | true | false |
verifiablePresentation | The JWT formatted and base64 encoded Verifiable Presentation. | base64 | string | - |
message | Additional message to be included for humans and/or logging systems | string | - |
Error Response
#
{
"success": false,
"errors": [
"expirationTime check failed",
"issuanceDate check failed"
],
"errorCodes": [
"vc_exp_expired",
"vp_iat_expired"
]
}
Fields
#
Response Field | Description | Type | Values |
---|
success | Boolean value indicating whether or not the request was successful. | Boolean | true | false |
errors | a list of error messages describing the error code(s) encountered while attempting to verify a VP | string | - |
errorCodes | a list of error code(s) as specified in the Digital Wallet Conformance Criteria encountered while attempting to verify a VP | string | enum | string |
Examples
#
Curl
#
curl --location --request POST 'https://app.caro.vc/api/v1/verifiablePresentation/verify' \
--header 'Authorization: Bearer [YOUR_API_TOKEN]' \
--header 'Content-Type: application/json' \
--data-raw '{
"verifiablePresentation": [BASE_64_ENCODED_VP],
"did": "did:ethr:example"
}'