Get Session ID
Your application’s server makes an API request to the GET /liveness/session endpoint, passing theaccount_id of the user you are verifying.
https://api.prod.verisoul.ai for production and https://api.sandbox.verisoul.ai for testing. See Environments.
Parameters
Account ID
account_id is your own stable identifier for the user — the same one you use elsewhere in your Verisoul integration. Pass it on every session you can.
Linking a session to an account is what turns a one-off verification into a persistent identity. When the session completes it is tied to the account automatically, which:
- Adds the session to the 1:N deduplication pool. The user’s biometric template becomes searchable, so every later Face Match is compared against it. A future session matching this face under a different
account_idis flagged withrepeat_face. - Creates an account on the real-time platform. This is the same account you would create by calling /session/authenticate. It appears in the dashboard and accumulates account-level signals such as
multiple_accountsandaccounts_linked. - Returns account context on the verify response. List memberships and triggered rules come back from /verify-face, and the decision respects your allow and block lists.
Repeat verifications of the same user are not multi-accounting. Deduplication compares across
account_id values, so an account with several Face Match sessions — retries, step-ups, sign-in authentication, or periodic re-verification — will not raise repeat_face for matching itself. That flag only fires when the same face shows up under a different account_id. Always reuse the same account_id for the same user instead of generating a new one per verification.account_id must be a non-empty string; an empty or malformed value returns a 400 invalid_account_id error.
The id Parameter
Face Match and ID Check share the same/liveness/session endpoint, and the id query parameter is the only thing that distinguishes them.
- Without
id— you get a Face Match session. The user takes a selfie video only. Verify it with /verify-face. - With
id=true— you get an ID Check session, and the user is additionally asked to upload an identity document.
id=true if you actually want the user to submit an identity document, in which case follow the ID Check integration instead.
Referring Session ID
When using Face Match alongside Verisoul’s platform, you can optionally pass areferring_session_id parameter in your session request.
This parameter should be the session ID from the user’s current interaction with Verisoul’s platform, before they begin the Face Match verification. By providing this context, Verisoul can make more informed risk assessments during the verification process.
Passing a referring session ID provides several benefits:
- Enhanced risk assessment capabilities for Face Match
- Access to referring session signals during verification
- Better detection of impersonation attempts and verification link sharing
Enrolling an Account ID Later
Some flows run verification before the account exists — for example, verifying a user before they finish signing up. In that case, create the session without an Enrolling has the same effect as passing
account_id and link it afterwards by calling POST /liveness/enroll with the session_id and the account_id once you have it.account_id up front: the account is created and the session joins the deduplication pool. The session must be complete and enrolled within 30 days of creation, and it can only be tied to one account — enrolling a session that already has an account returns session_already_tied_to_an_account.account_id on the session request — it is one fewer call and the account context is available the moment the session completes.
