ShareID
  • SDKs
    • Web
    • iOS
    • Android
    • Flutter
    • React Native
  • Photo-based authenticity API
  • Get a Token
    • Get a Token - Onboarding
    • Get a Token - Authenticate
  • Get the Analysis Result
    • Get Result - Onboarding
    • Get Result - Authenticate
  • AI Analysis Result
    • Analysis Result - Onboarding
    • Analysis Result - Authenticate
  • Message Handler
  • Changelog
    • SDK Web
    • SDK iOS
    • SDK Android
    • Photo-based authenticity API
  • Terminology
  • Api
  • FAQ
Powered by GitBook
On this page
  • MessageHandler signature
  • The message contains 2 properties:
  • 1. Code
  • 2. Step
Edit on GitHub

Message Handler

All SDKs provide a unique MessageHandler to indicate the success, failure or exit of the SDK.

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.

Important

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)

1. Code

Below, the list of codes that can be fired:

Success
Code
Message

success_onboarding

The user has successfully completed the onboarding process.

success_authenticate

The applicant has been successfully authenticated.

Exit
Code
Message

exit

The user exited the SDK flow without completing the process.

Failure
Code
Message

access_token_required

The access token must be provided.

sdk_configuration_failed

A problem occurred when retrieving the SDK configuration.

context_failed

A problem occurred during context initialisation.

ai_failed

A problem occurred in the AI processing

assets_failed

A problem occurred when loading assets.

error_failed

A problem occurred when sending the error to the server.

reset_failed

A problem occurred during reset.

no_camera

No cameras can be used.

set_frame_rate_failed

A problem has occurred when setting the frame rate.

process_image_failed

A problem has occurred during image processing.

process_video_failed

A problem has occurred during video processing.

no_http_response

No HTTP response was received.

invalid_status_code

The status code received by server is invalid. (code)

serialization_failed

A problem occurred during data serialization.

too_many_errors

Too many errors occurred during the operation.

camera_access_refused

Access to the camera has been denied by the user

session_expired

The session has expired.

http_timeout

The HTTP request timed out.

lost_internet_connection

The internet connection was lost.

not_authorized

The user is not allowed to continue their process.

validation_error

Validation could not be completed.

step_failed

A problem occurend during sending the step to the server.

no_method_and_challenge

No method or challenge is available.

2. Step

Below, the list of steps that can be fired:

Step
Step
Description

agreement

The first screen of our sdk with a summary of our process as well as the terms and policy.

doc_scope

The user is choosing a document and a country to scan.

front_check

The user is informed of the various steps he will have to complete for "recto" step.

back_check

The user is informed of the various steps he will have to complete for "verso" step.

face_check

The user is informed of the various steps he will have to complete for "liveness" step.

front_camera

The back camera is on, the live analysis may starts for "recto" detection.

back_camera

The back camera is on, the live analysis may starts for "verso" detection.

face_camera

The front camera is on, the live analysis may starts for liveness detection.

submission

Last screen of the sdk where the onboarding data are being sent.

PreviousAnalysis Result - AuthenticateNextChangelog

Last updated 10 days ago