clientToken (sst_…) minted by your backend before mounting the SDK.
Installation and Usage
- React
- Vanilla JS
- CDN Script Tag
The Completion Callback
onError receives { code, message } using the standard error codes — for example, SESSION_EXPIRED means you should mint a fresh session. Retryable 422 errors are handled inside the SDK’s built-in retake flow and never surface as onError calls.
Behavior Notes
- The SDK calls
GET /v1/verification_sessions/session_infoat mount to validate the token and fetch the session nonce before opening the camera — an expired or already-used session fails fast with no camera prompt. - Retakes for user-fixable problems (no face detected, blur, backlight) are built in, up to the session’s 3-attempt limit.
- The SDK never exposes scores or decisions to the page. Always verify the outcome server-side.
Prefer zero frontend code? Use the hosted page — it runs the same capture flow, served from SpoofSense’s origin, with no SDK to install.
