Face Match (UI Widget)
Add a drop-in Face Match flow to your app with a few lines of code.The widget handles selfie capture / upload, quality guidance, optional passive liveness, and sends a normalized request to
/faceMatch
. You receive a decision and similarity score.
- Built for Web (responsive)
- Zero-setup UI (camera + guidance)
- Optional liveness:
none
|passive
- Works with:
- Two images (selfie ↔ selfie)
- Selfie ↔ ID portrait token (
tokenFaceImage
) - Selfie ↔ biometric template
- Template ↔ template (no camera UI)
Prefer bringing your own UI? See Face Match (Service).
Prerequisites
- ✅ Authentication (Access Key)
- ✅ (Optional) Handshake if your app uses session bootstrap
- ✅ (Optional) Webhooks if you use
callbackUrl
(async)
Authentication
To access the Address Verification API, authentication is required. A Bearer Token must be included in every request.- Tokens are valid for 60 minutes and must be refreshed after expiration.
- Refer to the Authentication for detailed steps on obtaining a token.
- Include the token in the
Authorization
header as follows:
API Base URL
Install & Import
Basic Usage
Configuration
Notes
- If
comparisonMethod
is omitted, the widget infers it fromreference.type
: —tokenFaceImage
→docPhotoToImage
—image
→openImages
—template
→imageToTemplate
(selfie → template)
comparisonMethod: 'biometricTemplates'
, the widget won’t open the camera (no selfie needed).
Result Shape
Examples
A) Selfie ↔ Doc Portrait (with Passive Liveness)
B) Selfie ↔ Template (no liveness)
C) Template ↔ Template (no camera)
Theming & Localization
Events & Telemetry
Error States
The widget normalizes errors to a canonical shape (same as Service SDK).code | when | action |
---|---|---|
InvalidInput | Bad enum / missing required | Review config / reference type |
UnsupportedMedia | Corrupted Base64 / MIME | Re-capture or compress |
ImageQualityInsufficient | No face / blur / glare / occlusion | Widget prompts user with hints |
TemplateInvalid | Template unparsable | Verify provider format |
Unauthorized | Bad apiKey | Check Access Key |
ProviderError | Upstream failure | Retry with backoff |
RateLimited | Too many requests | Throttle |
UX Guidance (Built-in + Your Copy)
- Framing: single face, centered; show shoulders
- Lighting: even front light; avoid backlight & glare
- Stability: hold briefly; auto-capture when sharp
- No occlusions: remove sunglasses/masks/hats
You can override guidance copy via
ui.texts
.