Create a session

AI Tools

Once you have added the Yoti SDK dependency to your project, you can use it to build and create your session as shown in the code snippet below:

Node.js
Java
PHP
C#
Go
Copy

Your session can be configured with the following:

  • Preferences
  • Scheme
  • Notifications
Recommendation
Yoti strongly recommends you to use notifications for each session status.

Client Preferences

To create a session, please start by setting your preferences. For this purpose, the method sdkConfig builder is explained below. If parameters are not defined the default below will be set:

Node.js
Java
PHP
C#
Go
Copy
TypeParameter (examples)Description
withPrimaryColour#2d9fff(default), #ff0000Colours of the button provided in the frontend client as a hexadecimal RGB value.
withPresetIssuingCountryUSA, GBR

The user must select the issuing country of the document they are uploading. This setting determines which issuing country is selected by default.

NOTE: Must be a 3 letter ISO 3166 code.

withSuccessUrlhttps://yourdomain.com/successIf the upload/photo is successfully captured redirect your users here. Yoti will then begin to carry out the requested checks and tasks. If undefined, the page will not redirect and you can listen to Yoti's post messages on the same page.
withErrorUrlhttps://yourdomain.com/errorIf the upload/photo is unsuccessfully captured redirect your users here. If undefined, the user view will display an error screen, with the error code as a query parameter and won't redirect. (Details on the error codes can be found in [Client side user view](Client side user view))
withAllowHandofftrue, falseif enabled will offer the user to transfer flow from desktop to a mobile device by scanning a QR code.

Session Requirements

After that, specify the desired scheme in the identity profile requirements.

Single Schemes

You can specify the exact scheme that a user can be verified to, a full list of schemes can be found in this page below.

DBS BASIC:

Node.js
Java
PHP
C#
Go
Copy

CAN_CRC:

Node.js
Java
PHP
C#
Go
Copy

Dual Schemes

Yoti also gives the ability to use a combination or our schemes. This allows your users to meet multiple requirements within the same journey. For instance you can request a RTW scheme and a DBS scheme, users will be asked for a RTW documents first, then any additionally required DBS documents if DBS requirements have not already been met.

DBS + RTW:

Node.js
Java
PHP
C#
Go
Copy

RTW + Share Code:

Node.js
Java
PHP
C#
Go
Copy

The sharecode scheme can be requested as a fallback. When this is active, users are first asked to present a passport from either the United Kingdom or Ireland. If they do not have one, they are given the option to provide a UK RTW share code. To use this fallback method the RTW scheme needs to be first scheme requested in the "profiles".

Multiple Schemes (DBS + RTW + Share Code)

Node.js
Java
PHP
C#
Go
Copy

Profiles - Trust Framework

Yoti supports two trust_frameworks:

  • "UK_TFIDA". These are UK Government-certified identity workflows for DBS checks, Right to Work (RTW), and Right to Rent (RTR).
  • "YOTI_GLOBAL". These are pre configured Yoti schemes that allow you to verify a users ID document, perform a biometric face match, share code check and verify their address if required.

Available Schemes

Trust FrameworkScheme TypeObjectiveDescription
UK_TFIDARTWN/AUK certified right to work verification.
UK_TFIDARTRN/AUK certified right to rent verification.
UK_TFIDADBSBASIC, STANDARD, ENHANCEDUK certified digital method for verifying a person's identity for criminal record checks
YOTI_GLOBALIDENTITYAL_L1, AL_M1Yoti created Identity verification that can be set to a low assurance "L1" or a medium assurance "M1". The medium assurance adds a biometric face match.
YOTI_GLOBALIDENTITY_PLUS_ADDRESSAL_L1, AL_M1Yoti created Identity verification that can be set to a low assurance "L1" or a medium assurance "M1". The medium assurance adds a biometric face match. An address check will also be performed.
YOTI_GLOBALGBR_RTW_SHARECODEN/AYoti created verification that will fetch a users share code details and compare them to details extracted from a users Id documents.
YOTI_GLOBALCAN_CRCN/AYoti created Identity verification that will verify a document and perform a biometric face match. For the Canadian Criminal Record Check.

System Preferences

Then, specify the subject id and set the system preferences for your session.

Node.js
Java
PHP
C#
Go
Copy

The table below explains the optional parameters for the session and data retention configuration.

ParametersDescriptionOptional
withClientSessionTokenTtlThis is how long the full Identity verification session is open for in seconds. This must be longer than 300s (5 minutes).
withResourcesTtl

Retention period ("time to live") for uploaded documents/images in number of seconds. Default is one week (60_60_24*7=604800). This can be a minimum of 24 hours and must be at least 24 hours longer than the client_session_token_ttl. It starts from the first media upload.

Note: This config may result in additional charges. Please get in touch with support if considering a TTL longer than three months.

withUserTrackingIdAllows the relying business backend to track the same user across multiple sessions. Note: This should not contain any personal identifiable information.
WithSubjectAllows to track the same user across multiple sessions. Should not contain any personal identifiable information.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard