Verify a JSON credential
Verify a JSON credential by providing its payload. The credential is verified against the following criteria:
- Issuer DID can be resolved, so that the referenced DID Document is available and valid and the public key is obtainable.
- Proof is valid and the credential has not been tampered with.
- JSON-LD context is valid for subject claims.
Optional verification checks:
- If
assertExpiryis set totrueand the credential has a set expiration date, verification will fail if the expiration date has passed. - If
checkRevocationis set totrueand the provided credential contains a revocation status list, verification will fail if the credential has been set torevoked.
Analytics Events
Roles
/v2/credentials/web-semantic/verifyIn: header
Replace with the contents of the credential object from the response obtained when creating a JSON credential. Make sure you only include the contents of the credential object and not the entire response.
When set to true, verification will fail when expiration date has passed. This field is deprecated in favour of assertValidUntil, and will be disabled from September 2024.
trueWhen set to true, verification will fail when the credential has been revoked.
trueWhen set to true, verification will fail when issuanceDate has not been reached.
trueWhen set to true, verification will fail when expirationDate has passed. When specified, this overrides the deprecated assertExpiry property.
falseResponse Body
curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/verify" \ -H "Content-Type: application/json" \ -d '{ "payload": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://www.w3.org/2018/credentials/examples/v1" ], "type": [ "VerifiableCredential", "AlumniCredential" ], "issuanceDate": "2020-05-02T12:06:29.156Z", "credentialSubject": { "givenName": "Jamie", "familyName": "Doe", "alumniOf": "Example University" }, "proof": {} } }'{
"verified": true,
"reason": {
"type": "string",
"message": "string"
}
}{
"code": "string",
"message": "string",
"details": [
{
"value": "string",
"msg": "Invalid value",
"param": "id",
"location": "body"
}
]
}How would you rate this page?