Re-authenticate a verified person by face
Matches a live selfie against the reference enrolled when the person was verified, and answers in the same call. A liveness failure and a face that does not match are both 200 responses with authenticated: false. A hosted verification session token is also accepted in place of a key.
An unknown reference, a business, and a person who is not enrolled all answer the same 404 not_enrolled, so references cannot be probed.
Sandbox. Outside production the comparison is simulated and free. The outcome is authenticated unless sandboxOutcome pins another, or the externalUserId contains no_match, nomatch or mismatch (no match) or bio_error or bioerror (error).
Billing. Production attempts are charged per attempt. A no_match is charged, because the check ran. An attempt that fails with 502 is refunded.
Scoped publishable keys. A scoped publishable key needs a biometric user token for this person in X-Toden-User-Token, minted by your server with POST /api/v1/user-tokens/biometric. Legacy publishable keys and secret keys do not.
A selfie belongs to one person. Retrying the same selfie for the same person returns the original result and any proof not yet redeemed, with no second charge. The same selfie sent for a different person answers 409 selfie_already_used, with no charge and no proof.
Error codes
A missing or unknown key answers 401, where error is a short sentence rather than a code.
Accepts a publishable (pk_) or secret (sk_) key.
Authentication
Send the API key as a Bearer token. Each operation states whether a publishable key is enough or a secret key is required. A scoped publishable key has Verification flow access, the fixed set flow.run, flow.config.read and verifications.status.read; a scoped secret key reaches what its scopes allow.
Headers
A biometric user token for this person, minted by your server. Required with a scoped publishable key; legacy publishable keys and secret keys never read it.
Request
The mediaId of a live selfie uploaded through the upload endpoint with type selfie.
The mediaId of the liveness recording. Optional, and read by the server alongside the selfie when sent.
The liveness result reported by the capture. Required in effect: without it, or without a mode, the attempt answers liveness_failed.
Pins the simulated outcome outside production: authenticated, no_match or error, or live to run the real comparison on a development key. Ignored on live keys.
Response
The attempt ran. Read authenticated for the outcome.
authenticated, no_match when the faces did not match, or liveness_failed when the liveness result did not pass.
A single-use proof token, present only when authenticated is true. Your backend redeems it within 30 minutes to trust a result that came from a browser or app.