Capture API
Methods to start a session
| Method | Description |
|---|---|
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.
| 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. |
DocumentCameraTypes — 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 |