Skip to main content

Capture API

Markdown
Methods to start a session
MethodDescription
prepareSelfieCamera(_:config:)Prepares the selfie camera
prepareSelfieCamera(_:config:prepareInfo:)Prepares the selfie camera with PrepareInfo metadata
prepareDocumentCamera(_:config:)Prepares the document camera
open(_:webAppToken:)Opens the prepared selfie camera, passing the process.webAppToken returned by Create Process
openDocument(_:delegate:)Opens the prepared document camera with a DocumentEnums
Capture options / parameters

PrepareInfo — 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.

DocumentEnums — see Enums.

Result types and fields

SelfieResult — object returned on successful selfie capture.

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

SuccessResult — object returned by onSuccess in a Unico API integration.

FieldTypeDescription
processIdStringProcess identifier used to query the validation result via the REST API

DocumentResult — object returned on successful document capture. Same fields as SelfieResult.