Lookup Flow
Note: This feature requires an additional permission and must be explicitly requested
The "Lookp Flow" it's the same as the "Enrollment Flow" with the only difference that the first step is not the automatic scanning of a document through the camera phone but the user is asked to manually type in some information of the document that can be used to perform the lookup on the government database. Only one document at the time is supported. Other features like facial recognition and background check can be enabled in the same way as per the "Enrollment Flow". Note that not all the documents are supported.
In order to use our SDK you need an authorization token. Please check our API "Authorisation" in this regard.
The following method should be called when the application is initiated:
The Uqudo SDK provides a builder class to initiate the "Lookup Flow". See the example below:
Uqudo Lookup Builder Configuration
In order to check if the document type supports the "Lookup Flow" you can use the following method:
Configuration options provided in the Uqudo Lookup builder are:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
setToken(token) | String | No | null | See Authorisation |
setNonce(nonce) | String (max size 64 chars) | Yes | null | Nonce provided by the customer mobile application when the SDK is initiated. It is useful to make sure the process has been initiated by the customer mobile application. It should be generated server side. |
setSessionId(sessionId) | String (UUID v4) | Yes | Auto generated | Note: make sure to create always a new session id when you trigger the SDK flow |
disableSecureWindow() | None | Yes | false | Whether to allow users to take screenshots and capture screen recording or not. |
enableFacialRecognition() | None | Yes | None | Enable facial recognition with a default configuration, see Facial Recognition Configuration. |
enableFacialRecognition(configuration) | FacialRecognitionSpecification | Yes | None | Enable facial recognition with a custom configuration, see Facial Recognition Configuration. |
enableBackgroundCheck(configuration) | BackgroundCheckSpecification | Yes | None | Enable background check with a custom configuration, see Background Check Configuration. |
setDocumentType(document) | Document | No | None | Set the document type. Please refer to the Scan API for supported Document Types. |
returnDataForIncompleteSession() | None | Yes | false | When enabled, if the user or the SDK drops the session before completion, the SDK will return the partial data together with the SessionStatus object (see Handling the Result). Please note that you can expect some data only if the user passes at least the lookup step |
Facial Recognition Configuration
In order to check if the document type supports facial recognition you can use the following method:
By default the facial recognition is disabled. You need to enable Facial Recognition explicitly. See the example below:
Facial Recognition configuration options available:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
setLookupMinimumMatchLevel(matchLevel) | Int | Yes | None | Defines the minimum match level that the facial recognition has to meet for pictures from the government database |
setMaxAttempts(maxAttempts) | Int | Yes | 3 | Set the max failed facial recognition attempts before dropping the session. Note: only values between 1 and 3 are taken into consideration. |
allowClosedEyes() | None | Yes | False | Allows to have closed eyes during facial recognition. |
enableOneToNVerification() | None | Yes | False | Once activated, following a successful facial recognition (confirming liveness and matching the face), the system initiates a search for the user's selfie within your tenant. If the selfie is not found, it is added, and the indexed facial features are stored in the database. The SDK result includes a unique ID in the face object, along with an indication of whether there was a match with a previously onboarded selfie. It's essential to store this unique ID in your system alongside the user's record, facilitating future searches for users with the same ID. Please be aware that this option requires a specific permission, otherwise, it will be disregarded |
Background Check Configuration
Note: This feature requires an additional permission and must be explicitly requested
By default the Background Check is disabled. You need to enable Background Check explicitly. See the example below:
Background Check configuration options available:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
disableConsent() | None | Yes | false | Disable consent option for the user |
setBackgroundCheckType(type) | BackgroundCheckType | Yes | RDC | Sets the background check type |
enableMonitoring() | None | Yes | false | Enable continuous monitoring |
skipView() | None | Yes | false | If enabled, the step will be skipped, and the SDK will trigger the background check without any user interaction. |
Handling Exceptions
The Uqudo SDK will throw certain exceptions which need to be handled by the application. The Exceptions are:
IllegalStateException - e.g. enabling the "Lookup Flow" for a document that doesn’t support it or because facial recognition is enabled and the documcent doesn't support it or because of some required configuration missing
UnsupportedDeviceException - e.g. the device is rooted
Handling the Result
The enrollment result will be available to the application in the calling Activity’s onActivityResult method:
If the resultCode is equals to Activity.RESULT_OK you can find the SDK result in the data attribute. The string is the JWS, see "SDK result" for details.
If the resultCode is equals to Activity.RESULT_CANCELED you can find the SessionStatus object result in the data attribute under the key “key_session_status”. The SessionStatus contains the following properties:
sessionStatusCode as SessionStatusCode enum that contains the following error codes:
USER_CANCELLED = User canceled the enrollment process
SESSION_EXPIRED = Session expired or not found
UNEXPECTED_ERROR = Something went wrong
SESSION_INVALIDATED_OTP_TOO_MANY_ATTEMPTS = Some documents require an OTP step. The error is trigger if for example the OTP expires multiple times and the user is not moving forward
SESSION_INVALIDATED_FACE_RECOGNITION_TOO_MANY_ATTEMPTS = Session gets invalidated because of too many failed facial recognition attempts
sessionTask as SessionTask enum that contains the following codes:
LOOKUP = The lookup task
FACE = The facial recognition task
BACKGROUND_CHECK = The background check task (only if skipView() is not enabled)
data as String that contains the JWS object with the partial data of an incomplete KYC session. Returning the partial data for an incomplete KYC session is disabled by default, please see the related option in the Lookup Configuration Builder for details.
Last updated