light-mode-image
Learn
MATTR VII PlatformJSON

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 assertExpiry is set to true and the credential has a set expiration date, verification will fail if the expiration date has passed.
  • If checkRevocation is set to true and the provided credential contains a revocation status list, verification will fail if the credential has been set to revoked.

Analytics Events

CREDENTIAL_WEB_SEMANTIC_VERIFY_STARTCREDENTIAL_WEB_SEMANTIC_VERIFY_SUCCESSCREDENTIAL_WEB_SEMANTIC_VERIFY_FAIL

Roles

adminverifier
POST/v2/credentials/web-semantic/verify
AuthorizationBearer <token>

In: header

payloadVerifiableCredential

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.

assertExpiry?booleanDeprecated

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.

Defaulttrue
checkRevocation?boolean

When set to true, verification will fail when the credential has been revoked.

Defaulttrue
assertValidFrom?boolean

When set to true, verification will fail when issuanceDate has not been reached.

Defaulttrue
assertValidUntil?boolean

When set to true, verification will fail when expirationDate has passed. When specified, this overrides the deprecated assertExpiry property.

Defaultfalse

Response Body

curl -X POST "https://example.vii.au01.mattr.global/v2/credentials/web-semantic/verify" \  -H "Content-Type: application/json" \  -d '{    "payload": {      "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?