POST /credentials/verify
Verify the integrity of a Verifiable Credential.
{{baseUrl}}/credentials/verify
Headers
Header | Type | Description |
---|---|---|
x-api-key | string | The API key required for authentication. |
Request Body
Parameter | Type | Description |
---|---|---|
credential | object | The Verifiable Credential object to be verified. |
Sample Request Body:
{
"credential": {
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"id": "DegreeCredential8fa09780-23b2-4b9c-a7b5-c9d292fd9826",
"type": [
"VerifiableCredential",
"DegreeCredential"
],
"version": "DegreeCredential",
"credentialSchema": {
"id": "http://ssi-stage.myearth.id/schema/DegreeCredential",
"type": "JsonSchemaValidator2018"
},
"issuer": "did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR:0.0.5021630",
"credentialSubject": [
{
"id": "did:earthid:testnet:CqfgWPDd67TBe3wieHhhD9y9M6AderRRJnozU12DdP2t:0.0.5021687",
"degree": "Bachelor of Computer Science",
"dateOfBirth": "01-01-2000",
"city": "Delhi"
}
],
"issuanceDate": "2024-10-23T10:03:50.676Z",
"expirationDate": "+020245-10-23T10:03:50.676Z",
"proof": {
"type": "HederaConsensusProof",
"creator": "did:earthid:testnet:HwetGVKwLAu12HRZaCKcMxdijsjxdSc7Lw1KSzC6FYDR:0.0.5021630",
"created": "2024-10-23T10:03:50.676Z"
}
}
}
Click Send
and wait for the response.
Response (Success - 200)
Parameter | Type | Description |
---|---|---|
success | bool | Indicates whether the verification process was successful. |
data.isIssuerDIDValid | string | Status of whether the issuer DID is valid. |
data.isVCValid | string | Status of whether the Verifiable Credential is valid. |
message | string | A message indicating the result of the verification. |
status | int | HTTP status code (200). |
Sample Response Body:
{
"success": true,
"data": {
"isIssuerDIDValid": "Success",
"isVCValid": "Success"
},
"message": "The User is valid. Issuer DID is verified and found to be valid. The credential is verified and found to be valid.",
"status": 200
}
Response (Server Error - 500)
Parameter | Type | Description |
---|---|---|
error | string | Describes the error that occurred. |
Sample Response Body:
{
"error": "Server error"
}