Skip to content

Verify an agent VC

Server-side helper that verifies a VC and optionally checks its audience and challenge. Unauthenticated. Production verifiers should verify locally against the JWKS instead.

POST
/verify-vc

Request Body

application/json

Request to verify a VC.

The VC to verify.

If provided, must equal payload.aud exactly.

If provided, must equal payload.challenge exactly.

Responses

Verification result. valid: true with the decoded payload, or valid: false with a claim-mismatch error (audience_mismatch or challenge_mismatch).

application/json

Verification result. When valid, payload is present; when invalid due to a claim mismatch, error is present.

Whether the VC is valid and all provided expectations matched.

Decoded VC payload.

Claim-mismatch reason when valid is false.

Valid values"audience_mismatch""challenge_mismatch"
{
  "valid": "<boolean>",
  "payload": {
    "typ": "<string>",
    "sub": "<string>",
    "iss": "<string>",
    "aud": "<string>",
    "jti": "<string>",
    "challenge": "<string>",
    "iat": "<integer>",
    "exp": "<integer>"
  },
  "error": "<string>"
}

Released under the MIT License.