Skip to main content

Receiving the result

Markdown

The SDK returns the capture result through callbacks defined in the delegate interfaces used during the capture session.

AcessoBioSelfieDelegate
Unico API

onSuccess is only delivered when the camera is opened with a webAppToken — the process.webAppToken returned by Create Process. See User Journeys. It is required: without it, the SDK fails with error 74001.

onSuccessSelfie must still be implemented to satisfy the delegate interface, but its result is not used in a Unico API integration.

onSuccess

Called upon successfully completing the journey. Returns a SuccessResult object containing a processId used to query the result of the customer validation process via the REST API.

func onSuccess(_ result: SuccessResult!) {
let processId = result.processId
}
onErrorSelfie

Called when an error occurs during capture. Returns an ErrorBio object with the code and desc properties. See Error handling for the full list of error codes and recommended handling.

func onErrorSelfie(_ errorBio: ErrorBio!) {
let code = errorBio.code
let description = errorBio.desc
}