Skip to main content

Capture API

Markdown
Methods to start a session
MethodDescription
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.

FieldTypeRequiredDescription
externalUserIdStringyesUser identifier within your system. Hashed with SHA-256 before transmission.
useCaseStringnoIdentifier for the context or flow currently running. Transmitted in plain text.

UnicoIDSmartOptions — reference process for the capture. Available from Flutter plugin 4.65.0.

FieldTypeRequiredDescription
referenceProcessIdStringyesId 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.
useCaseStringyesContext 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).

FieldTypeDescription
base64StringCaptured image in Base64
encryptedStringJWT to be sent to the backend