Guides
Credential verification
Direct verification
Web Credential

How to verify a Web Credential

This guide will step you through making a direct API call to verify a signed Web Credential.

Prerequisites

Request

Make a request of the following structure to verify a Web Credential:

HTTP
POST /v2/credentials/web-semantic/verify

Request body

JSON
{
    "payload": {
        "type": ["VerifiableCredential", "EducationalOccupationalCredential", "AlumniCredential"]
        //... rest of Web Credential
    },
    "checkRevocation": true,
    "assertValidFrom": true,
    "assertValidUntil": false
}
  • payload : Replace with the contents of the credential object from the response obtained when creating a Web Credential. Make sure you only include the contents of the credential object and not the entire response.
  • checkRevocation : When set to true and the provided credential contains a revocation status list, verification will fail if the credential has been revoked.
  • assertValidFrom : When set to true and the credential has a set valid from date, verification will fail if the credential is not active yet (issuanceDate is in the future).
  • assertValidUntil : When set to true and the credential has a set expiry date, verification will fail if the expiry date has passed (expirationDate is in the past).

Response

JSON
{
    "verified": true
}
  • verified : Indicates whether the verification status is true or false. When verified is false, a further error body is returned with more details about the error:
    • The credential has been revoked.
    • The Issuer DID cannot be resolved.
    • The issuer public key is invalid.
    • The credential JSON-LD context is invalid.
    • The credential signature is invalid.