Capture API
Methods to start a session
| Method | Description |
|---|---|
prepareSelfieCamera(_:config:) | Prepares the selfie camera |
prepareSelfieCamera(_:config:prepareInfo:) | Prepares the selfie camera with PrepareInfo metadata |
prepareDocumentCamera(_:config:) | Prepares the document camera |
open(_:) | Opens the prepared selfie camera |
openDocument(_:delegate:) | Opens the prepared document camera with a DocumentEnums |
Capture options / parameters
PrepareInfo — 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. |
DocumentEnums — see Enums.
Result types and fields
SelfieResult — object returned on successful selfie capture.
| Field | Type | Description |
|---|---|---|
base64 | String | Captured image in Base64 |
encrypted | String | JWT to be sent to the backend |
DocumentResult — object returned on successful document capture. Same fields as SelfieResult.