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.
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
| Param | Req | Description |
|---|---|---|
| zelfProof | Yes | HumanID string from paste, or from QR extraction in this form |
| verifierKey | No | If 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.
| Param | Req | Description |
|---|---|---|
| zelfProofQRCode | Yes | Image as a data URL (data:image/png;base64,...) or another form accepted by the API (this demo builds a data URL from the file) |
| verifierKey | No | Same 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
previewHumanIdand, for QR images,previewZelfIdQrfrom@humanauthn/api-clientwith your session token. - Success responses follow the Verifik pattern: a
dataobject (and often asignaturewhen signing is enabled for your project).
Related documentation
Official guides on docs.verifik.co
Preview ZelfProof
Reference for inspecting public metadata from a proof before you decrypt or use it elsewhere.
Create a ZelfProof
Encrypt your public fields and face capture into a new HumanID string you can store or share.
Decrypt a ZelfProof
Unlock the identity payload inside a proof by matching it to a live face.
Create QR ZelfProof
Generate a QR that embeds a HumanID so people can scan it from a screen or wallet.
Liveness detection
Run a dedicated check that a face image looks live rather than spoofed. Separate from HumanID preview.