Preview HumanID

Preview HumanID

Inspect public metadata from a ZelfProof. No face or credentials needed.

menu_bookAPI reference: Preview HumanIDexpand_more

Official documentation: docs.verifik.co/api/tags/preview-zelfproof (parameters, responses, and examples). This demo calls POST /v2/human-id/preview via previewHumanId, which matches that workflow on the current API. Related: Create a ZelfProof, Decrypt a ZelfProof.

Base URL https://api.verifik.co. Send JSON with Content-Type: application/json and Authorization: Bearer <access token> (same JWT as this demo after sign in).

POST /v2/human-id/preview

Returns non-sensitive preview fields for a proof (for example whether a password is required) inside the usual signed data envelope.

HeaderValue
Content-Typeapplication/json
AuthorizationBearer <token>
ParamReqDescription
zelfProofYesHumanID string from paste, or from QR extraction in this form
verifierKeyNoIf the proof was created with a verifier key
await fetch("https://api.verifik.co/v2/human-id/preview", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${accessToken}`,
  },
  body: JSON.stringify({
    zelfProof: "<human id string>",
  }),
});

POST /v2/human-id/preview-zelf-id-qr

Use when the user provides a PNG or JPEG of the HumanID QR. The API decodes the payload and returns a zelfProof you can send to the preview call above. Same JSON headers as preview. Optional verifierKey when the proof uses one.

ParamReqDescription
zelfProofQRCodeYesImage as a data URL (data:image/png;base64,...) or another form accepted by the API (this demo builds a data URL from the file)
verifierKeyNoSame semantics as on preview when the proof uses a verifier key
await fetch("https://api.verifik.co/v2/human-id/preview-zelf-id-qr", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${accessToken}`,
  },
  body: JSON.stringify({
    zelfProofQRCode: "data:image/png;base64,<...>",
  }),
});
  • This demo uses previewHumanId and, for QR images, previewZelfIdQr from @humanauthn/api-client with your session token.
  • Success responses follow the Verifik pattern: a data object (and often a signature when signing is enabled for your project).
menu_book

Official guides on docs.verifik.co