Launch the user view

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

  • Session ID

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

  • As a link on your webpage
  • As a link shared securely with a user
  • Within an iFrame on your webpage

Hint This is only for sessions where the UI needs to be launched

HTTP
Copy
URL ParameterDescription
sessionIdThe session ID from the Yoti session create response.
sdkIdThis is your SDK ID provided to you by Yoti.

Once the Yoti Client has launched, it will take the user through the age verification flow. The user will be redirected to the specified callback URL on completion of one of the age verification methods.

user view

user view

Good to know
While it is possible to use this solution in an iFrame, using a new browser window will guarantee an optimal user experience.

Preferred method

Yoti offers flexibility when it comes to presenting the user interface of specific methods to end users. If you wish to encourage a particular age verification method to be used first, you can launch the user directly into that specific method. Doing so will mandate the option. If the user fails this method, they can fallback to a different method that has been enabled if retries have been configured. The option to directly launch specific methods also gives integrators the ability to show a list of the methods that they have configured in their own UI.

Age estimation example

Below is an example of initially directing a user to the age estimation method and then giving them the opportunity to select a different method if they failed to meet the age verification threshold.

Once the user attempts the age estimation method but fails to meet the age threshold, they will be presented with the following screen:

If then they click on the 'Select another method' button they will be presented with the other available methods:

retry_enabled must be set to "true" to allow users to try different methods upon failure.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard