Web client
The next step is to load the Yoti client SDK.
How it works
The constructed URL (using the sessionId and session token), which loads the customised Yoti Client SDK, can be used in several ways:
- Within an iframe on your webpage
- As a link on your webpage
- As a link shared securely with a user
In the response to your create session request, you will have received:
- Session ID
- Session Token
These values can now be used to create a URL.
https://api.yoti.com/idverify/v1/web/index.html?sessionID=<inputsessionID>&sessionToken=<yoursessionToken>| URL Component | Description |
|---|---|
| sessionId | The session ID from the Yoti response. |
| sessionToken | The session token from the Yoti response. |
The example below demonstrates the use of an iframe:
<iframe src="<https://api.yoti.com/idverify/v1/web/index.html?sessionID=<inputsessionID>&sessionToken=<yoursessionTokenID>" style="height:600px; width:100%; border:none;" allow="camera"></iframe>Once the Yoti Client SDK has launched it will take the user through the ID document capture flow.
The Yoti Client SDK will fetch the verification session configuration that was defined on session creation. This will provide configuration for the captures to be performed, and which methods are allowed.
Having received the session configuration, the Yoti Client SDK will handle the capture of all resources necessary to process the requested tasks and checks, and submit them to the server.
Once the required resources (and their associated media) have been captured and uploaded, the end user is redirected back to the relying business client so that they may continue their journey via the success or error URLs. The tasks and checks are performed in the background, and any updates are sent to the updates URL (if subscribed) or can be found by calling the session retrieval endpoint.
Mobile client
The mobile integration provides a native version of Yoti Doc Scan which can be integrated into your own Mobile App, as opposed to being rendered through a webpage.
The mobile integrations that we currently support are listed below for the Yoti Doc Scan integration. Please select your preferred language to continue.
Error codes
| Error Codes | Platform - Mobile or Web | Description | Retry Possible |
|---|---|---|---|
| 1000 | Mobile | No error occurred - the end-user cancelled the session for an unknown reason. | Yes |
| 2000 | Mobile/Web | Unauthorised request (wrong or expired session token). | Yes New session required. |
| 2001 | Mobile/Web | Session not found. | Yes New session required. |
| 2002 | Mobile/Web | Session expired. | Yes New session required |
| 2003 | Mobile/Web | SDK launched without session Token. | -- |
| 2004 | Mobile/Web | SDK launched without session ID. | -- |
| 3000 | Mobile/Web | Yoti's services are down or unable to process the request. | Yes |
| 3001 | Mobile | An error occurred during a network request. | Yes |
| 3002 | Mobile/Web | User has no network. | Yes |
| 4000 | Mobile/Web | The user did not grant permissions to the camera. | Yes The end-user will be asked again to grant permissions to the camera |
| 5000 | Mobile/Web | No camera. (When user's camera was not found and file upload is not allowed) | No |
| 5001 | Web | Unsupported browser/platform by the liveness flow. | No |
| 5002 | Mobile/Web | No more local tries for the liveness flow. | Yes |
| 5003 | Mobile | SDK is out-of-date - please update the SDK to the latest version. (see github pages) | No |
| 5004 | Mobile/Web | Unexpected internal error. | No |
| 5005 | Mobile | Unexpected document scanning error. | No |
| 5006 | Mobile/Web | Unexpected liveness error. | No |
| 5007 | Web | iOS browser in use other than Safari. Only Safari on iOS may access camera. | No |