Skip to main content

Capture API

Methods to start a session
MethodDescription
openCameraSelfie({jsonFileName, listener})Opens the selfie camera
openCameraSelfie({jsonFileName, listener, prepareInfo})Opens the selfie camera with UnicoCheckPrepareInfo metadata
openCameraDocument({jsonFileName, documentType, listener})Opens the document camera with the desired DocumentCameraTypes
Capture options / parameters

UnicoCheckPrepareInfo — metadata to identify the user session.

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

DocumentCameraTypes — 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