Integration guide
There are four steps to follow for the integration:
Install the SDK
Create the share session
Retrieve the profile
This section will explain how to install the SDK and create a session.
Install the SDK
Once you have added the Yoti SDK dependency to your project, it’s time to initialise a Yoti client as shown in the code snippet below.
Once you have a working Yoti QR/button, you can move on to installing the SDK.
To successfully integrate you will need the following information about your application from Yoti Hub:
SDK ID
Your application key pair
The Yoti SDKs are available via popular dependency management systems. Further details can be found on the pages of the specific projects.
To install the Yoti SDK:
Once you have added the Yoti SDK dependency to your project, you can initialise the Yoti Digital Identity Client as shown below:
Using Yoti SDK
The description on how to use the SDK can be found here:
Please read the above for a full description and understanding, below, we’ll provide examples on how those requests will expose the new functionality.
Identity Profile Requirements Explained
Field | Value | Description |
|---|---|---|
trust_framework | String | Defines under which trust framework this identity profile should be verified. Enum: UK_TFIDA |
scheme | Object | Defines which scheme this identity profile should satisfy. The scheme must be supported by the specified trust framework otherwise the request is considered invalid. |
type | String | Defines which scheme this identity profile should satisfy. Enum: DBS, RTW, RTR, DBS_RTW |
objective | String | Defines the objective to be achieved for the particular scheme. It must be provided for those schemes where it is mandatory. Example, this is mandatory for DBS and the possible values are: ”BASIC”, “STANDARD”, “ENHANCED”. |
Subject ID Explained
Field | Description |
|---|---|
subject_id | allows the RP to track a subject across session creation and session retrieval |
The dynamicScenario can be used to get a shareURL which will be used by the Yoti scripts to generate a Yoti QR code.
Client side view
Once you have the Share session, you can use it on the frontend for it to render a Yoti QR code. Please see example below using the modal QR code.
Query parameters
You can append query params to the landing page URL that displays the Yoti QR/button. These will be added to the redirect URI.
For example if you load the landing page containing the Yoti button as follows:
https://example.com/?iso=test&user_id=6667
The query parameters (iso=test&user_id=6667) will be returned in the callback URL.
Response
Further details on how to use the SDK to get shared attributes can be found here:
In case of a successful transaction, once the profile is retrieved, the identity profile report can be accessed.
The identity profile report contains the verified identity details and the verification report that certifies how the identity was verified and how the verification level was achieved.
User experience
There will be instances where we have exhausted all available ‘routes’ to help a user achieve compliance with the requested scheme and not been successful. In these cases the user will not be able to complete the ‘share’, and will be shown a screen which informs them that they cannot continue with the journey in our app. This will trigger a failure sharing scenario, responding back with an associated error code.