Face Session Flow
Note: this feature requires an additional permission and must be explicitly requested
This feature can be used to initiate a facial recognition session based on an image (e.g. id photo) provided through our API (see "Face Session API" in the API documentation). Below you can find an example to initiate the face session.
You require an authorisation token from the Uqudo API using the credentials for your account.
The example below assumes that you have already initialised the SDK:
Configuration options
The configuration options are described below:
Property | Type | Optional | Default | Description |
---|---|---|---|---|
authorizationToken | String | No | None | See Authorisation |
nonce | String | Yes | None | 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. |
sessionId | String | No | None | The session id returned by the “Face Session API”, see API documentation |
minimumMatchLevel | Integer | Yes | None | Defines the minimum match level that the facial recognition has to meet. |
enableAuditTrailImageObfuscation(obfuscationType) | ObfuscationType | Yes | None | Enables audit trail image background obfuscation leaving only the face visible. It can be used when there are privacy concerns related to the background of the selfie taken by the user and shared in the SDK result. There are two types of obfuscations:
|
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. |
returnDataForIncompleteSession | Boolean | Yes | false | When enabled, if the user or the SDK drops the session before completion and there was at least one failed facial recognition attempt, the SDK will return the partial data together with the SessionStatus object in the data attribute, that will contain the same JWS string that is returned in a successful scenario |
allowClosedEyes | Boolean | Yes | false | Allows to have closed eyes during facial recognition |
Handling the Result
The face session result will be available to the builder delegate if the operation succeeds and you get the result with the following method. See "SDK result (Face Object)" for the details about the JWS string:
A failure scenario can be handled with the following methods:
See the details about the UQSessionStatus below.
Session Status Handling
The UQSessionStatus is used to identify the status of the enrollment task. The object contains the following properties:
statusCode contains the following error codes:
USER_CANCEL = User cancel the operation
SESSION_EXPIRED = Session expired or not found
UNEXPECTED_ERROR = Something went wrong. In the message the details of the error
SESSION_INVALIDATED_FACE_RECOGNITION_TOO_MANY_ATTEMPTS = Session gets invalidated because of too many failed facial recognition attempts
statusTask contains the following codes:
FACE = The facial recognition task
message contains the details of the status code
data as String that contains the JWS object with the partial data of an incomplete KYC session. Returning the partial data for an incomplete Account Recovery session is disabled by default, please see the "Configuration Options" for details.
Last updated