Verifiable presentation verification

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 methodEndpoint
POST/api/v1/verifiablePresentations/verify

Headers #

Authentication
Please see Obtaining and using a Token for a detailed description of how to authenticate yourself with our API.
NameValue
Content-Typeapplication/json
AuthorizationBearer: [token]

Body #

Example request body
{
    "verifiablePresentation": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImRpZDpleGFtcGxlOjB [...]",
    "verifierDID": "did:ethr:example"
}
KeyDescriptionTypeRequired
verifiablePresentationThe JWT-formatted and base64-encoded Verifiable Presentation.base64 \ string
verifierDIDThe 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 FieldDescriptionTypeValues
successBoolean value indicating whether or not the request was successful.Booleantrue | false
verifiablePresentationThe JWT formatted and base64 encoded Verifiable Presentation.base64 | string-
messageAdditional message to be included for humans and/or logging systemsstring-

Error Response #

{
  "success": false,
  "errors": [
    "expirationTime check failed",
    "issuanceDate check failed"
  ],
  "errorCodes": [
    "vc_exp_expired",
    "vp_iat_expired"
  ]
}

Fields #

Response FieldDescriptionTypeValues
successBoolean value indicating whether or not the request was successful.Booleantrue | false
errorsa list of error messages describing the error code(s) encountered while attempting to verify a VPstring-
errorCodesa list of error code(s) as specified in the Digital Wallet Conformance Criteria encountered while attempting to verify a VPstringenum | string

Examples #

Curl #

curl --location --request POST 'https://app.caro.vc/api/v1/verifiablePresentations/verify' \
--header 'Authorization: Bearer [YOUR_API_TOKEN]' \
--header 'Content-Type: application/json' \
--data-raw '{
    "verifiablePresentation": [BASE_64_ENCODED_VP],
    "did": "did:ethr:example"
}'