Capture API
Methods to start a session
| Method | Description |
|---|---|
openCameraSelfie({listener}) | Opens the selfie camera |
openCameraSelfie({listener, idSmartOptions}) | Opens the selfie camera against a reference process, passing UnicoIDSmartOptions |
openCameraDocument({documentType, listener}) | Deprecated since Flutter SDK 4.64.0. Opens the document camera with the desired DocumentType |
Capture options / parameters
UnicoCheckPrepareInfo — metadata passed to startSilentValidation to identify the user session. See Silent Revalidation.
| Field | Type | Required | Description |
|---|---|---|---|
externalUserId | String | yes | User identifier within your system. Hashed with SHA-256 before transmission. |
useCase | String | no | Identifier for the context or flow currently running. Transmitted in plain text. |
UnicoIDSmartOptions — reference process for the capture. Available from Flutter plugin 4.65.0.
| Field | Type | Required | Description |
|---|---|---|---|
referenceProcessId | String | yes | Id of an earlier, concluded process of the same user, created by your account (for example, the user's Onboarding). Use the id that the Unico API returned when that process was created. This capture compares against it. |
useCase | String | yes | Context of the operation. Use one of the values listed in Smart Revalidation. |
Enablement
This option requires Smart Revalidation enabled for your account. Contact your Unico representative before you use it. Without it, the camera runs the regular capture.
DocumentType — Deprecated since Flutter SDK 4.64.0. See Enums.
Result types and fields
ResultCamera — object returned on successful capture (selfie or document).
| Field | Type | Description |
|---|---|---|
base64 | String | Captured image in Base64 |
encrypted | String | JWT to be sent to the backend |