Skip to content

Verify W3C VC 2.0 Verifiable Credential

This guide demonstrates how to verify a W3C Verifiable Credential (VC) 2.0 using the Verifier service API. Use your own credential, or the sample below, to test verification.

Before you start, complete the setup guide to set up your environment.


Below is a sample W3C VC 2.0 Verifiable Credential that you’ll use for verification.

W3C VC 2.0 Credential Sample
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"type": [
"VerifiableCredential",
"ExampleEmployeeCredential"
],
"issuer": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"validFrom": "2023-06-01T09:25:48Z",
"validUntil": "2025-06-01T09:25:48Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"employer": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example Corporation"
}
},
"proof": {
"type": "DataIntegrityProof",
"created": "2023-06-01T09:25:48Z",
"verificationMethod": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9#zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"cryptosuite": "ecdsa-sd-2023",
"proofPurpose": "assertionMethod",
"proofValue": "u2V0BhVhA8zrF81ZNJ5If-X-ejI_U4GNp5lOIQoHcfOJihmW9hjRH0Y_JyVWfKOp27YIZRUP2lfdDMsAi_0qIpHw1ht9xcVgjgCQCurXhqc23OvW_atEphK7uzG7jHSkSZqoZPhGBGDNGbkeDWEA9oxz2Lm2eJZfuZs2gcNAlv3sUtWPVSi17dbnly8wIatzVZHvQGanARrHtehaK3xdEYpoUNHpUPalEGzqHza0wWEBMt-85F3OHCMdayRLC-EUlnA8Rp5ZcxbcxAQJhIdm3W1iT8mQeufRJ1IahSkq7Jdh56VmE_tnqGmvjg8N7ISoPWEDy1GSZBNofTyU3lP4X5b-saU3NLNTwblo35jsolH_F0hvhB-bYk7Ts40T69SKYzWPxYBnnLMjVzbLt8ZioyHDCoQBYIPSJjEj5O-r0lVRzcnF9RvRNuSjk08ay4THSOKOn3zFRhQIDBQYH"
}
}

Run the following command to verify your credential:

Verify a W3C VC 1.1 Credential
curl \
--request POST -i "$VIDOS_VERIFIER_ENDPOINT/vidos/verifier/draft/verify" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $VIDOS_API_KEY" \
--data '{
"credential": {
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://www.w3.org/ns/credentials/examples/v2"
],
"type": [
"VerifiableCredential",
"ExampleEmployeeCredential"
],
"issuer": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"validFrom": "2023-06-01T09:25:48Z",
"validUntil": "2025-06-01T09:25:48Z",
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"employer": {
"id": "did:example:c276e12ec21ebfeb1f712ebc6f1",
"name": "Example Corporation"
}
},
"proof": {
"type": "DataIntegrityProof",
"created": "2023-06-01T09:25:48Z",
"verificationMethod": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9#zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"cryptosuite": "ecdsa-sd-2023",
"proofPurpose": "assertionMethod",
"proofValue": "u2V0BhVhA8zrF81ZNJ5If-X-ejI_U4GNp5lOIQoHcfOJihmW9hjRH0Y_JyVWfKOp27YIZRUP2lfdDMsAi_0qIpHw1ht9xcVgjgCQCurXhqc23OvW_atEphK7uzG7jHSkSZqoZPhGBGDNGbkeDWEA9oxz2Lm2eJZfuZs2gcNAlv3sUtWPVSi17dbnly8wIatzVZHvQGanARrHtehaK3xdEYpoUNHpUPalEGzqHza0wWEBMt-85F3OHCMdayRLC-EUlnA8Rp5ZcxbcxAQJhIdm3W1iT8mQeufRJ1IahSkq7Jdh56VmE_tnqGmvjg8N7ISoPWEDy1GSZBNofTyU3lP4X5b-saU3NLNTwblo35jsolH_F0hvhB-bYk7Ts40T69SKYzWPxYBnnLMjVzbLt8ZioyHDCoQBYIPSJjEj5O-r0lVRzcnF9RvRNuSjk08ay4THSOKOn3zFRhQIDBQYH"
}
},
"options": {
"at": "2024-06-15T12:00:00Z"
}
}'

HTTP status 200 indicates the credential was successfully verified. Failed verifications also return non HTTP 200 with detailed results.

Sample HTTP Response Headers
HTTP/2 200
date: Wed, 19 Nov 2025 16:09:47 GMT
content-type: application/json; charset=utf-8
x-vidos-request-id: req_7068f13c-6937-4b14-bddb-284ff589e341
...
{
"results": [
{
"data": {
"credentialType": "vc",
"format": "w3:vc-data-model:json-ld",
"version": "w3c:vc-data-model:v2.0"
},
"path": [],
"policy": "format",
"service": "verifier",
"status": "success"
},
{
"data": {
"reference": "2025-06-01T09:25:48.000Z",
"target": "2024-06-15T12:00:00.000Z"
},
"path": [],
"policy": "notAfter",
"service": "verifier",
"status": "success"
},
{
"data": {
"reference": "2023-06-01T09:25:48.000Z",
"target": "2024-06-15T12:00:00.000Z"
},
"path": [],
"policy": "notBefore",
"service": "verifier",
"status": "success"
},
{
"data": {
"type": "w3c",
"verificationMethods": [
{
"id": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9#zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"type": "JsonWebKey2020",
"controller": "did:key:zDnaekGZTbQBerwcehBSXLqAg6s55hVEBms1zFy89VHXtJSa9",
"publicKeyJwk": {
"crv": "P-256",
"kty": "EC",
"x": "JsDXbCAWoV7dhtu8HT9WxXdmXBd_t082s_N_uWYNN54",
"y": "DBXabPuCx6xG4VcVfBtKkRZL3iC4FYHXaA9eLdZ9dXE"
}
}
]
},
"path": [],
"policy": "proof",
"service": "verifier",
"status": "success"
}
]
}