POST /verify-vp
Verify a Verifiable Presentation and its disclosed attributes.
{{baseUrl}}/verify-vp
Headers
Header | Type | Description |
---|---|---|
x-api-key | string | The API key required for authentication. |
Request Body
Parameter | Type | Description |
---|---|---|
vpToken | object | The Verifiable Presentation token that needs to be verified. |
sharedAttributes | object | Attributes from the Verifiable Credential that were shared in the presentation. |
holderDID | string | DID of the holder of the Verifiable Presentation. |
holderPublicKey | string | Public key of the holder used for verifying the Verifiable Presentation. |
Sample Request Body:
{
"vpToken": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiablePresentation"
],
"verifiableCredential": [
{
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"id": "DegreeCredential-19c30c4c-8772-4218-94d2-cb66b87c2253",
"type": [
"VerifiableCredential",
"DegreeCredential"
],
"issuer": "did:earthid:testnet:A5kd3bvBdNKv5ucwxnbgqV7Jr5UJi1Hmho3qnKw7Kfom",
"issuanceDate": "2024-10-19T09:39:00.001Z",
"expirationDate": "+020245-10-19T09:39:00.001Z",
"credentialSubject": [
{
"city": "Delhi"
}
],
"proof": {
"type": "Ed25519Signature2018",
"created": "2024-10-19T09:39:00.001Z",
"proofPurpose": "assertionMethod",
"jws": "eyJjcml0IjpbImI2NCJdLCJiNjQiOmZhbHNlLCJhbGciOiJFZERTQSJ9..ODI4YzY2MzFlMmFjNDBmZDk4NjgwYmNlMGQyNWZkMjU1NzA3M2FlODQyYjg2ZTQ3MGY4NTk1MGMyNzIwMTY1ZDBmYWZlYjgwZDE3NzQ0ODFhZDhlYTYxYjdhMGExMjQ2OWZkODIxYTdiNzYwNDUxMTkwZTAxMDgwNDEyYTAzMDA="
}
}
],
"holder": "did:earthid:testnet:DLoz9cZjsq1TezAZZZ5JZRe64Dsqb2w1wgq6Evyewurr",
"presentationAttributes": {
"DegreeCredential-19c30c4c-8772-4218-94d2-cb66b87c2253": [
"city"
]
},
"issuanceDate": "2024-10-19T11:26:27.900Z",
"proof": {
"type": "EcdsaSecp256k1Signature2019",
"created": "2024-10-19T11:26:27.920Z",
"verificationMethod": "did:earthid:testnet:DLoz9cZjsq1TezAZZZ5JZRe64Dsqb2w1wgq6Evyewurr",
"signatureValue": "304602210099258925cfd3349ae4786ea3cef7e09e34020cc42d4cd2b34b703424b1008fe502210089001f04111316c700ea8515ad7cd4d2c941e54c31471f57994bf04229223566"
}
},
"sharedAttributes": {
"DegreeCredential-19c30c4c-8772-4218-94d2-cb66b87c2253": [
"city"
]
},
"holderDID": "did:earthid:testnet:DLoz9cZjsq1TezAZZZ5JZRe64Dsqb2w1wgq6Evyewurr",
"holderPublicKey": "047f422ec4c08c97af19867779b6189559c01a5430f579acee1ac6063f3ee6cc541d4719b555148aaac9f7137865be76a3bf4dc16acb11d2c336da79d9bf88975f"
}
Click Send
and wait for the response.
Response (Success - 200)
Parameter | Type | Description |
---|---|---|
message | string | A success message indicating the VP and attributes were verified. |
Sample Response Body:
{
"message": "VP and attributes successfully verified."
}
Response (Server Error - 500)
Parameter | Type | Description |
---|---|---|
error | string | Describes the error that occurred. |
Sample Response Body:
{
"error": "Server error"
}