Quick Start
Get from zero to your first biometric verification. This guide walks you through the full flow: getting access, understanding your project, generating API tokens, configuring scoring, and making your first API call.
Prerequisites
- A Biometry account. Request access here if you don’t have one.
- A backend server (Node.js, Python, Go, etc.) that will proxy API calls to Biometry.
Step 1: Get access
Biometry uses a waitlist-based onboarding process:
- Register at the Biometry Console.
- Your registration enters a review queue. A Biometry administrator will review and approve your account.
- Once approved, a project is automatically created for you. This project is your workspace — it holds your API tokens, scoring configurations, sessions, and transaction history.
After approval, log in to the Console to access your project dashboard.
Step 2: Generate an API token
API tokens authenticate your backend’s requests to the Biometry API. Each token is scoped to your project and determines which biometric services (Face Liveness Detection, Voice Recognition, etc.) your requests are authorised to use.
- Go to the API Management page in the Console.
- Select the biometric services you want this token to have access to.
- Click Generate Token.
- Copy and securely store the token — it will not be shown again.
Step 3: Set up your backend
Store the API token as an environment variable on your backend. Never commit it to version control.
# .envBIOMETRY_API_TOKEN=your_api_token_here# .envBIOMETRY_API_TOKEN=your_api_token_hereexport BIOMETRY_API_TOKEN=your_api_token_hereAll API v2 requests go to the base URL:
https://api.biometrysolutions.com/api-gateway/v2Every request must include the token in the Authorization header:
Authorization: Bearer YOUR_API_TOKENFor a detailed reference on request format, response structure, and error codes, see API Calls.
Step 4: Start a session
Sessions group related transactions (consent, enrollment, verification) together so you can track them as a unit in the Console dashboard.
curl --location 'https://api.biometrysolutions.com/api-gateway/v2/sessions' \ --request POST \ --header 'Authorization: Bearer YOUR_API_TOKEN'Response:
{ "data": { "session_id": "sess_fe402c29-b543-4413-8624-af1a2a0b2f2c" }, "meta": { "message": "session started successfully" }}Save the session ID (data.session_id) — you’ll pass it as the session_id field of the request part in the following requests.
Step 5: Collect user consent
Before performing biometric operations, you must collect consent from your end-user. There are two types:
| Consent type | Required for |
|---|---|
| Authorization consent | Face & voice verification, enrollment, storing a reference image |
| Storage consent | Face & voice enrollment (together with authorization consent) |
Liveness itself needs no consent; without authorization consent, face and voice recognition are skipped rather than failed. A user you are going to enroll needs both, recorded in one call:
curl --request PUT 'https://api.biometrysolutions.com/api-gateway/v2/users/USER_IDENTIFIER/consents' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_API_TOKEN' \ --data '{ "authorization": true, "storage": true, "session_id": "sess_fe402c29-b543-4413-8624-af1a2a0b2f2c" }'session_id is optional; it shows the consent with the session in the Console.
Record consent once per user, not on every login: it is stored and checked on every later call, and recording it again is a no-op. Read more in the Consent guide.
Step 6: Run a liveness check
This is the core verification step. Your end-user records a short video where they show their face and read a set of digits out loud. Your backend sends that video to Biometry’s /v2/liveness endpoint. Identity and options travel in a JSON request form field alongside the video.
- Your backend issues a challenge: we recommend 8 distinct digits from 1–9, from a secure random source, for example
48719352. It stores them against this user’s login attempt, expires them within 5 minutes, and returns them to the device. See Liveness challenge for the rules and Node and Go examples. - The device shows the challenge and records the user reading it. Pass it to the capture component, for example
<FaceRecorder challengeDigits={challenge} recordingSeconds={10} … />(about 10 seconds suits 8 digits), and upload only the video to your backend. - Your backend takes its stored copy, deletes it so it can’t be used again, and sends it as
phrase:
curl --location 'https://api.biometrysolutions.com/api-gateway/v2/liveness' \ --header 'Authorization: Bearer YOUR_API_TOKEN' \ --form 'request={"user_id":"USER_IDENTIFIER","session_id":"sess_fe402c29-b543-4413-8624-af1a2a0b2f2c","phrase":"48719352"}' \ --form 'video=@"/path/to/video.mp4"'Response:
{ "data": { "active_speaker_detection": { "code": 0, "description": "Successful check", "result": 97.79, "score": 98.77 }, "face_liveness_detection": { "code": 0, "description": "Successful check", "result": true, "score": 76.65 }, "visual_speech_recognition": { "code": 0, "description": "Successful check", "result": "FOUR EIGHT SEVEN ONE NINE THREE FIVE TWO", "score": 88.64 } }, "decision": { "status": "pass", "score": 0.91, "reasons": [] }, "meta": { "request_id": "fc5605c5-...", "message": "liveness analysis complete" }}The services returned depend on which services your API token is authorised for. Each service returns its own score and result, while decision.status gives you the overall pass, fail, or refer verdict based on your active scoring system. This verdict covers this call only. In a session, the verification result is the decision you get when you end the session — see Reading the verdict.
To verify against an enrolled template, call /v2/face-verify or /v2/voice-verify in the same session, on the same video: set "use_session_video": true in the request part and send no file. Face and voice results from another video don’t count. See Sessions for the rules and the full Verification reference for all parameters, response fields, and error codes.
Step 7: Enroll the user
Liveness proves a live person is in front of the camera; it does not create anything to recognise them by next time. API v2 never enrolls implicitly — /v2/liveness, /v2/face-verify and /v2/voice-verify do not create templates — so a new user must be enrolled explicitly, or every later face or voice verification has nothing to compare against.
The simplest face enrollment reuses the video the liveness step already stored on the session — no second upload. It must happen before you end the session:
curl --location 'https://api.biometrysolutions.com/api-gateway/v2/enrollments/face' \ --header 'Authorization: Bearer YOUR_API_TOKEN' \ --form 'request={"user_id":"USER_IDENTIFIER","session_id":"sess_fe402c29-b543-4413-8624-af1a2a0b2f2c","use_session_video":true}'Enrollment requires both consents from Step 5. Voice enrollment needs several dedicated recordings rather than the session video — see Voice Enrollment.
Step 8: Understand scoring systems
Scoring systems control how individual service scores combine into the final decision.status verdict. Every API token has a scoring system assigned to it — by default, the Default scoring system is used.
How it works
A scoring system is made up of scoring blocks — one per biometric service. Each block defines:
| Property | Description |
|---|---|
| Weight | How much this service contributes to the overall score (0 to 1). |
| Fail threshold | If the service score falls at or below this value, the block is considered failed. |
| Critical | If a critical block fails, the entire result is immediately fail — regardless of other services. |
| Active | Whether this block is evaluated. Inactive blocks are skipped. |
The system computes a weighted average of all active block scores, then compares it against the scoring range:
- Score ≥ pass value →
"pass" - Score ≤ fail value →
"fail" - Score between the two →
"refer"(needs manual review)
Default scoring system
Your project gets a scoring system when it is created. It scores Active Speaker Detection, Face Liveness Detection, Face Recognition and Voice Recognition as critical blocks (Visual Speech Recognition is inactive), with a pass threshold of 80 and a fail threshold of 50. A block whose service your token does not enable is skipped, not failed.
Creating custom scoring systems
You can create and manage scoring systems from the Console under Configurations → Scoring System. When you create or update a scoring system, you assign it to one or more API tokens — those tokens will then use your custom scoring rules instead of the default.
This is especially useful when you need different verification strictness for different use cases (e.g., a stricter scoring system for financial transactions vs. a more lenient one for basic identity checks).
Step 9: End the session
Once you’ve completed all the operations for this user, end the session:
curl --location 'https://api.biometrysolutions.com/api-gateway/v2/sessions/sess_fe402c29-b543-4413-8624-af1a2a0b2f2c/end' \ --request POST \ --header 'Authorization: Bearer YOUR_API_TOKEN'The response carries the session’s decision: the session’s liveness, face-verify and voice-verify results scored together, with its face match counted when one ran. This is the verification result: grant access only on accept. Document checks are not part of it, so check their response yourself.
{ "decision": { "status": "accept", "score": 0.93 }, "meta": { "request_id": "fc5605c5-...", "message": "session ended successfully" }}A session is single-use: after end, calls naming it answer 409 session_ended. Start a new session for the next attempt. See Sessions.
You can now view the session and all its transactions in the Console dashboard.
Step 10: View results on the dashboard
Every transaction you make through the API is recorded and visible in the Console dashboard. You can:
- Review individual transaction results and service scores.
- Inspect session history and linked transactions.
- Flag transactions as fraudulent or possibly fraudulent for investigation. See Fraud for details.
- Retrieve raw samples (video frames, source files) for any transaction via the Get Samples endpoint.
Try it with the demo app
To see the full end-to-end flow in action before building your own integration, check out the Web SDK example application included in the SDK repository. It demonstrates a working React integration with camera capture, session management, and video processing — all wired through a backend proxy.
Use it as a reference, but keep in mind that for production you should implement your own flow:
Your app (captures media) → Your backend (proxies with API token) → Biometry APISee Architecture recommendations below for the full pattern.
Architecture recommendations
How you integrate Biometry into your system matters for both security and reliability.
Your backend is the gateway
Your application architecture should follow this pattern:
End-user device Your backend Biometry API┌──────────────┐ ┌──────────────────┐ ┌───────────────┐│ Browser / │ │ │ │ ││ Mobile app │─────>│ Your server │────>│ Biometry ││ │<─────│ (API token │<────│ API Gateway ││ (SDK) │ │ stored here) │ │ │└──────────────┘ └──────────────────┘ └───────────────┘Why this matters:
- API token security: Your token never leaves your backend. Embedding it in frontend code exposes it to anyone who inspects the page source.
- Request validation: Your backend can validate and sanitise user input before forwarding it to Biometry, preventing abuse.
- Rate control: You can enforce your own rate limits and business logic (e.g., only allowing authenticated users to submit biometric checks).
- Audit trail: Your backend logs provide a complete record of what was sent to Biometry and when.
Using the SDKs
Biometry provides client-side SDKs to handle media capture (camera, microphone) on the end-user’s device. The captured files should then be sent to your backend, which forwards them to the Biometry API.
| Platform | Packages | Purpose |
|---|---|---|
| Web | biometry-sdk, biometry-react-components | SDK client + pre-built React UI components (FaceRecorder, DocScan, etc.) |
| Flutter | biometry | SDK client for Flutter/Dart applications |
On the frontend, show the challenge your backend issued and capture the video:
import { FaceRecorder } from 'biometry-react-components';
function Verification({ challenge }) { // challenge came from your backend, e.g. "48719352" const handleConfirm = async ({ file }) => { const formData = new FormData(); formData.append('video', file); // video only: no phrase
// Send to YOUR backend, not directly to Biometry const response = await fetch('/api/verify', { method: 'POST', body: formData, }); };
return <FaceRecorder challengeDigits={challenge} recordingSeconds={10} onConfirmRecording={handleConfirm} />;}On your backend, forward the video to Biometry with your API token and your stored copy of the challenge (see Liveness challenge for issuing it):
app.post('/api/verify', async (req, res) => { // Read and delete in one step, so the challenge is used once. const challenge = await redis.getDel(`liveness-challenge:${req.loginAttempt.id}`); if (!challenge) { return res.status(409).json({ error: 'challenge expired or already used' }); }
const formData = new FormData(); formData.append('video', req.files.video);
formData.append('request', JSON.stringify({ user_id: req.user.id, session_id: req.loginAttempt.biometrySessionId, phrase: challenge, // never req.body.phrase }));
const response = await fetch( 'https://api.biometrysolutions.com/api-gateway/v2/liveness', { method: 'POST', headers: { 'Authorization': `Bearer ${process.env.BIOMETRY_API_TOKEN}`, }, body: formData, } );
const result = await response.json(); res.json(result);});For the full SDK API reference, see the Web SDK and Flutter SDK documentation.
Additional recommendations
- Use sessions to group related transactions. This makes debugging and auditing significantly easier in the Console dashboard.
- Implement retries with backoff for
500errors. Biometry services are highly available, but transient failures can occur. - Use webhooks for asynchronous processing. Some operations (like Anti-Video Forgery) take longer; webhooks notify your server when results are ready instead of requiring polling.
- Pass device information and geolocation headers when available. These enrich your fraud detection data. See Device Information and Geo Location.
What’s next?
Now that you have a working integration, explore the capabilities in depth:
| Goal | Where to go |
|---|---|
| Enroll a user’s face for future recognition | Face Enrollment |
| Enroll a user’s voice for future authentication | Voice Enrollment |
| Match a document photo to a live face | Face Match |
| Verify document authenticity | DocAuth |
| Detect video forgery | Deepfake Check |
| Set up event-driven processing | Webhooks |
| Review all available services | Services overview |
| Integrate the Web SDK | Web SDK |
| Integrate the Flutter SDK | Flutter SDK |