Implementation through URL forwarding
Initial steps
With this option, the onboarding process is carried out in the Mobbeel Gateway domain, outside the integrator client's corporate domain.
To use this type of integration it is only necessary to add to your HTML page a link that points to the onboardingUrl, obtained by the integrator client server in the response of the /onboarding/token endpoint.
Example code:
<a href="{{ onboardingUrl }}">Start onboarding</a>
The page will open in a new browser tab and the user will be able to start the onboarding process.
At the end of the process, the user will be redirected to the redirectUrl that the integrator client server has indicated in the body of the request to the endpoint /onboarding/token, as long as the value is not empty or null.
Error management
If an error occurs a modal dialog (can optionally be disabled) will be shown to the user with a brief description of the problem. By clicking the Accept button, the user will be automatically redirected to the redirectUrl that the integrator client server has indicated in the body of the request to the endpoint /onboarding/token, as long as the value is not empty or null.
A parameter with key error will be added to the redirectUrl with the type of error that occurred during the process, these being the errors that can occur during the onboarding process:
- ConnectionError: The user's device does not have a stable network connection or is not available.
- HardwareError: The user's device does not have a camera and/or microphone (if necessary), or is not available for use due to a hardware problem.
- OnboardingError: The onboarding process has been canceled because some problem occurred during the process (see possible causes below).
- PermissionError: The user has not granted access permissions to the camera and/or microphone (if required).
- SupportError: The onboarding process cannot be completed because an unexpected error has occurred (contact us to report it).
- TimeoutError: The onboarding process has been canceled because the user has exceeded the maximum time set.
- TokenError: The onboarding unique identifier has expired and is no longer valid for onboarding.
In some cases, in addition, a parameter with key cause will also be added to the redirectUrl, which will indicate a more specific cause of the error, and allow the integrator to perform more specific actions. Here are the specific possible causes of each error:
ConnectionError
- FetchTimeoutError: Some of the calls made to the server have exceeded the maximum time allowed.
- LowNetworkQualityError: The network quality is not enough to perform the process.
HardwareError
- CameraNotAvailableError: The user's device does not have a camera.
- CameraNotReadableError: The user's camera is in use by another process and cannot be accessed.
- CameraDeviceError: The user's camera is not accessible by the browser and cannot be accessed (generic hardware error).
OnboardingError
- ClassificationError: The document used during the process could not be classified by the service or, even though it is classified, it does not correspond to those allowed for onboarding.
- FetchError: A communication error has occurred with the server.
- ValidationError: The user has not passed any of the validation criteria enabled for the onboarding process, either for scanning the document or for facial identification.
PermissionError
- CameraNotAllowedError: The user has not granted access permissions to the camera.
- MicrophoneNotAllowedError: The user has not granted microphone access permissions (if these are required for the process).
TokenError
- ScanIdError: The user is trying to perform the onboarding process with an identifier already used.
Example codes
Original redirectUrl set by the integrator client:
https://www.mobbeel.com?token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Modified redirectUrl with the error parameter and cause:
https://www.mobbeel.com?token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&error=onboardingError&cause=validationError
In any case, all the original parameters established by the integrating client are always maintained.