Skip to content

Message Handler

MessageHandler signature

MessageHandler(message:Message)

The message contains 2 properties:

  • The code is a string constant which describe the case.
  • The step will indicate at which step of the process the user was when this event occurred.

Warning

By default, all errors returned by the response handler are displayed on a screen to interrupt the process and prevent malfunctions.

These errors can be displayed or not by the developer by specifying the shouldShowError value.

(only screens related to lost_internet_connection, session_expired cannot be ignored by this value)

Custom redirection

By default, the SDK returns you to the same screen from which you opened it.\ Alternatively, you can use MessageHandler to choose to display a new screen in the event of success, failure, etc.

1. Code

Below, the list of codes that can be fired:

Success
CodeMessage
success_onboardingThe user has successfully completed the onboarding process.
success_authenticateThe applicant has been successfully authenticated.
Exit
CodeMessage
exitThe user exited the SDK flow without completing the process.
Failure
CodeMessage
access_token_requiredThe access token must be provided.
sdk_configuration_failedA problem occurred when retrieving the SDK configuration.
context_failedA problem occurred during context initialisation.
ai_failedA problem occurred in the AI processing
assets_failedA problem occurred when loading assets.
error_failedA problem occurred when sending the error to the server.
reset_failedA problem occurred during reset.
no_cameraNo cameras can be used.
set_frame_rate_failedA problem has occurred when setting the frame rate.
process_image_failedA problem has occurred during image processing.
process_video_failedA problem has occurred during video processing.
no_http_responseNo HTTP response was received.
invalid_status_codeThe status code received by server is invalid. (code)
serialization_failedA problem occurred during data serialization.
too_many_errorsToo many errors occurred during the operation.
camera_access_refusedAccess to the camera has been denied by the user
session_expiredThe session has expired.
http_timeoutThe HTTP request timed out.
lost_internet_connectionThe internet connection was lost.
not_authorizedThe user is not allowed to continue their process.
validation_errorValidation could not be completed.
step_failedA problem occurend during sending the step to the server.
no_method_and_challengeNo method or challenge is available.

2. Step

Below, the list of steps that can be fired:

Step
StepDescription
agreementThe first screen of our sdk with a summary of our process as well as the terms and policy.
doc_scopeThe user is choosing a document and a country to scan.
front_checkThe user is informed of the various steps he will have to complete for "recto" step.
back_checkThe user is informed of the various steps he will have to complete for "verso" step.
face_checkThe user is informed of the various steps he will have to complete for "liveness" step.
front_cameraThe back camera is on, the live analysis may starts for "recto" detection.
back_cameraThe back camera is on, the live analysis may starts for "verso" detection.
face_cameraThe front camera is on, the live analysis may starts for liveness detection.
submissionLast screen of the sdk where the onboarding data are being sent.