Skip to main content

POST /credentials/verify

Verify the integrity of a Verifiable Credential.

{{baseUrl}}/credentials/verify

Headers

HeaderTypeDescription
x-api-keystringThe API key required for authentication.

Request Body

ParameterTypeDescription
credentialobjectThe 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)

ParameterTypeDescription
successboolIndicates whether the verification process was successful.
data.isIssuerDIDValidstringStatus of whether the issuer DID is valid.
data.isVCValidstringStatus of whether the Verifiable Credential is valid.
messagestringA message indicating the result of the verification.
statusintHTTP 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)

ParameterTypeDescription
errorstringDescribes the error that occurred.

Sample Response Body:

{
"error": "Server error"
}