1
Initialize Vouch
Install the SDK and create a client instance. Store your API key in an environment variable — never hard-code it.
2
Option A: Use the Identity Modal
Call The modal handles camera permissions, document framing guidance, and liveness detection automatically. Your code only needs to act on the resolved result.
vouch.identity.verify() with the user’s ID from your platform. This opens a guided iframe that walks the user through document capture and a selfie liveness check. The promise resolves once the user completes (or abandons) the flow.3
Option B: Build Your Own UI
If you need full control over the capture experience, use For best liveness detection accuracy, capture at least three frames taken 300–500 ms apart during normal head movement.
vouch.identity.submitVerification() directly. You provide the document image and an array of selfie frames, then process the result yourself.4
Handle the Result
The result object contains everything you need to gate access or surface a rejection reason to the user.
Calling
vouch.identity.verify() or vouch.identity.submitVerification() for an externalUserId that already has a verification record updates their profile rather than creating a duplicate. Use this to trigger re-verification after a failed attempt or when a user’s document expires.