Integration guide
MobbID performs the biometrics; your backend decides. Whatever captures the face or the voice — a mobile SDK, the Gateway or your own front end — every result is confirmed on the server before you grant access. This guide explains how the pieces fit together once you have completed the Quick start.
Credentials
Mobbeel provides an application ID, the server URL of each environment and two kinds of API key:
| API key | Used by | Allows |
|---|---|---|
| API role | Your backend | Every endpoint: users, groups, operations, Gateway processes and biometric operations |
| SDK role | The tokens your backend hands to the SDKs | Biometric operations only |
Both keys stay on your backend: you exchange them for an auth token, valid for 30 minutes by default, and only the token travels to an app or a browser. To validate a token without calling MobbID, check its signature with the public keys.
Integration patterns
Mobile and web SDKs
The SDK captures the face in your app and runs the operation. Your backend prepares it and confirms the result:
- Your backend requests a token with the SDK role key and, optionally, starts the operation to fix its
operationIdin advance. - The app initialises the SDK with the token and runs the capture. The SDK callback updates your UI.
- Your backend reads the operation with an API role token. Never trust the result reported by the app: grant access only if
statusisSUCCESSanddata.resultistrue.
See the SDK guides: Android, iOS and Capacitor.
Gateway
The Gateway is a hosted web flow: no capture code on your side.
When the process is COMPLETED, its operation field contains the full operation: check status and data.result exactly as with the SDKs. See Web Gateway.
Server to server
Your own front end captures the samples and your backend sends them to the API, as in the Quick start. Use this pattern when you already have a capture experience, or to enrol users from images you hold, such as a verified identity document.
Operation lifecycle
Every enrolment, verification and identification is an operation with an operationId:
- Start the operation with the
/startendpoint of its type. Skip this step if Mobbeel has configured your application to accept your ownoperationId, or to generate one. - Send the samples with the
operationId. A202response means more samples are needed:progresstells how far it has got, from 0 to 100. Keep sending them with the sameoperationId. - Read the result. The response gives it immediately, and Get an operation returns it at any later time, with its evidence.
status | Meaning |
|---|---|
PENDING | Started, waiting for samples |
PROCESSING | In progress |
SUCCESS | Finished: read the outcome in data.result |
ERROR | Ended with an error: see data.error |
Matching, extraction and detection need no start call: each request is a complete operation.
Users and groups
- A user holds one enrolment per biometric method. Create users with the identifiers of your own system, so you never need a mapping table.
- Every enrolled user belongs to the
DEFAULTgroup. Create more groups to narrow down identification — for example the employees of one building — which makes it faster and more accurate. - Deleting a user removes all their biometric data. Deleting an enrolment keeps the user and their other enrolments.
Liveness
Send livenessMethod with the samples to check that they come from a live person:
| Method | Value | Sample |
|---|---|---|
| Face, passive video | 1 | Short MP4 video; the user holds still for a moment |
| Face, passive image | 2 | One JPEG or PNG image |
| Voice | 0 | Audio recording; detects replays and synthetic voices |
Without livenessMethod, no liveness check is made. Failed liveness returns 400 with NO_LIVENESS_DETECTED. The SDKs and the Gateway apply passive liveness for you.
Quality and errors
Every face sample goes through quality checks before matching. When one fails, the response is 400 with BAD_SAMPLE_QUALITY in message and the failed checks in detail — IMAGE_TOO_DARK, NO_FRONTAL_FACE, SUNGLASSES… — so you can tell the user what to correct. See every error code.
Scores and thresholds
Operations return three scores, from 0 to 1: matching (similarity), liveness and identityVerification (overall confidence). The decision uses the thresholds configured for your application, returned in the operation as matchingThreshold and livenessThreshold. Agree them with Mobbeel according to your security policy; Understand MobbID explains the trade-off.
Templates
A template is the numerical representation of a person's face or voice. You can extract it from a sample, store it in your own system, and use it later in the template endpoints of enrolment, verification, identification and matching, or export the enrolled one. Enrolling with a template replaces the user's previous template.
Good practices
- Confirm every result in your backend, with an API role token. App and browser results are only for the UI.
- Keep the API keys on the server and rotate them if they are exposed.
- Send a
transactionIdto group the operations of one user journey, for monitoring and audit. - Retry with guidance. On quality errors, tell the user what to change instead of retrying blindly.
- Use groups for identification, instead of searching every enrolled user.