Method 1: vouch.identity.verify(externalUserId)
This method injects a hosted iframe modal into the current browser page. The modal walks the user through document capture and selfie liveness steps, then resolves the returned Promise once verification is complete. It is the recommended approach for browser-based applications because it requires no additional UI work on your side.
string
required
Your platform’s unique identifier for the user being verified. Vouch stores the result against this ID so you can retrieve it later.
vouch.identity.verify() is a browser-only method. Calling it in a Node.js or server-side environment will throw because there is no DOM to inject the modal into.Method 2: vouch.identity.submitVerification(documentFile, selfieFrames, externalUserId)
This method uploads a document image and an array of selfie frames directly to the Vouch API. Use it when your application already has its own camera or file-capture UI and you want to handle the user experience yourself.
File | Blob
required
A JPEG or PNG image of the user’s identity document. Maximum file size is 5 MB.
(File | Blob)[]
required
An array of JPEG or PNG selfie frames captured from the user’s camera. Provide between 3 and 15 frames for the best liveness detection accuracy.
string
required
Your platform’s unique identifier for the user. Same semantics as
verify().Provide 3–15 selfie frames for reliable liveness results. A single frame is accepted but significantly reduces detection confidence. Each individual file must be JPEG or PNG and must not exceed 5 MB.
Response fields
Both methods resolve with anIdentityVerifyResult object.
string
Top-level outcome of the verification request. Either
"success" or "failed".string
A human-readable description of the outcome, useful for logging or displaying error details to your support team.
object
The structured verification payload.