Client side user view

The next step is to load the Yoti client side view. Here we describe how to:

  • Launch the web client
  • Or launch the mobile client

Web client

In the earlier section we saw how to create a request, which returns:

  • Session ID
  • Session Token

We can then use these to construct a URL which loads the Yoti client side view. The URL can be used in the following ways:

  • Within an iframe on your webpage
  • As a link on your webpage
  • As a link shared securely with a user
HTTP
Copy
URL ComponentDescription
sessionIdThe session ID from the Yoti response.
sessionTokenThe session token from the Yoti response.

The example below demonstrates the use of an iframe:

Markdown
Copy

Once the Yoti client side view has launched, it will take the user through the ID document capture flow.

Please note: allow="camera" is required when using Yoti Identity verification on mobiles (web or native), and is serving the website over HTTPS.

Event notifications

Yoti recommends using POST messaging if you would like to be notified for one of the following situations :

  • When the iFrame flow has successfully completed
  • If an error occurs during the flow. See below for full error list.

A POST message for either of these events is structured as follows:

Javascript
Copy

Below is a javascript example that can be used to listen to these messages.

Javascript
Copy

Please note if a success URL or error URL is supplied as part of the session preferences then the iFrame will redirect after button click at the end of the flow. To utilise POST messaging, a success URL and error URL should be omitted.

iFrame launch - Post method

Step 1: Render the Iframe with just the base Yoti URL, without the URL parameters:

https://api.yoti.com/idverify/v1/web/index.html

Step 2: Using the postMessage JavaScript functionality the session can will be launched with the correct configuration, posting the following

JSON
Copy

Step 3: User proceeds as normal. No other implementation changes are required to enable this functionality.

HTML
Copy

In-session feedback

OCR failure on the document is a good sign that there’s something wrong with the submission.

Yoti will process the image and provide feedback to the user based on the result of the image capture. In unsuccessful prompting the user to try to upload once again and why if unsuccessful.

In session feedback should help:

  • Notify the user something is wrong with the submission
  • Provide the user with a chance to re-upload the document within the same session
  • Increase number of successful checks

By default, Yoti will allow 1 extra attempt. The screen that will be shown to the user on unsuccessful attempts is:

In session feedback example screen

In session feedback example screen

The user flow is as follows:

  1. The user will select document type and country.
  2. The user will upload / take a photo of the document.
  3. If the document can be OCR’d it will go through.
  4. If it cannot due to user error, they will be asked to retry or change their document type.

If the user has reached their maximum attempts the session will end there.

End of in-session feedback

End of in-session feedback

Reclassification

If the wrong document is uploaded Yoti will attempt to reclassify the document. That means, that if the submitted document type or / and country would be different from the ones user selected Yoti will save it under the detected one if the data is extracted successfully.

Translation

Yoti Identity verification has configuration settings to change the language of the information displayed to the client.

Supported languages are:

  • French (Français)
  • Spanish (Español)
  • Thai (ภาษาไทย)
  • Russian (русский)
  • Brazilian Portuguese (português brasileiro)
  • Turkish (Türkçe)
  • Vietnamese (Tiếng Việt)
  • Czech (čeština)
  • German (Deutsch)
  • Canadian English
  • Polish (polski)
  • Italian (Italiano)
  • Danish (Dansk)
  • Finnish (Suomi)
  • Norwegian (Norsk)
  • Dutch (Dutch)
  • Swedish (Svenska)
  • Japanese (日本)
  • Romanian (România)

For information on how to do this please go to Client preferences.

Jump to
Please head over to our document settings section where you can remove documents / countries in the user view.

Hint See the next page for information on integrating our native SDK's.

Error codes

Error CodesPlatform - Mobile or WebDescriptionRetry Possible
1000MobileNo error occurred – the end-user cancelled the session for an unknown reason.Yes
2000Mobile/WebUnauthorised request (wrong or expired session token).Yes, a new session is required.
2001Mobile/WebSession not found.Yes, a new session is required.
2002Mobile/WebSession expired.Yes, a new session is required.
2003Mobile/WebSDK launched without session Token.Yes, a new session is required.
2004Mobile/WebSDK launched without session ID.Yes, a new session is required.
3000Mobile/WebYoti's services are down or unable to process the request.Yes
3001MobileAn error occurred during a network request.Yes
3002Mobile/WebUser has no network.Yes
4000Mobile/WebThe user did not grant permissions to the camera.Yes The end-user will be asked again to grant permissions to the camera.
4001WebThe user has submitted a document that does not match the selection.Yes, a new session is required.
5000Mobile/WebNo camera. (When user's camera was not found and file upload is not allowed)No
5001WebUnsupported browser/platform by the liveness flow.No
5002Mobile/WebNo more local tries for the liveness flow.Yes
5003MobileSDK is out-of-date - please update the SDK to the latest version - (see github pages).No
5004Mobile/WebUnexpected internal error.No
5005MobileUnexpected document scanning error.No
5006Mobile/WebUnexpected liveness error.No
5007WebiOS browser in use other than Safari. Only Safari on iOS may access camera.No
5008WebUnsupported configurationNo
5009MobileThere was not enough storage available to write to the deviceNo
5010WebCamera access failed and no alternative capture method availableNo
6000MobileDocument Capture dependency not found errorNo
6001MobileLiveness dependency not found errorNo
6002MobileSupplementary Document capture dependency not found errorNo
7000WebThe user does not have the required documents to complete the sessionNo
7001WebThe user tried to update an address with invalid values more than 3 timesNo
7002WebThe user has exhausted all Liveness attempts (DBS RTW only)No
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard