Tracked devices

Yoti offers the ability to request the devices that interacted with the session and some of the device details. We record this metadata once specific events in the user journey have occurred. An object will be generated for each event, detailing the device information at the time of the event.

const devicesResponse = await idvClient.getSessionTrackedDevices(sessionId);
const events = devicesResponse.getDeviceEvents()
const firstEvent = events[0]

firstEvent.getEvent();
firstEvent.getCreated();

const firstEventDevice = firstEvent.getDevice();

firstEventDevice.getIpAddress();
firstEventDevice.getManufactureName();
firstEventDevice.getModelName();
firstEventDevice.getOSName();
firstEventDevice.getOSVersion();
firstEventDevice.getBrowserName();
firstEventDevice.getBrowserVersion();
firstEventDevice.getLocale();
firstEventDevice.getClientVersion();
<?php
use Yoti\Http\RequestBuilder;
use Yoti\Http\Payload;
$request = (new RequestBuilder())
->withBaseUrl('https://api.yoti.com/idverify/v1')
->withPemFilePath('<YOTI_KEY_FILE_PATH>')
->withEndpoint('/sessions/<session_ID>/tracked-devices')
->withMethod('GET')
->withQueryParam('sdkId', '<YOTI_CLIENT_SDK_ID>')
->build()
//get Yoti Response
->execute();
from yoti_python_sdk.http import SignedRequest, RequestHandler
import json
import requests

def execute(request):
response = requests.request(
url=request.url, data=request.data, headers=request.headers, method=request.method)
return response.content

def fetch_tracked_devices():

signed_request = (
SignedRequest
.builder()
.with_pem_file("<YOTI_KEY_FILE_PATH>")
.with_base_url("https://api.yoti.com/idverify/v1")
.with_endpoint("/sessions/<SESSION_ID>/tracked-devices")
.with_http_method("GET")
.with_param("sdkId", "<YOTI_CLIENT_SDK_ID>")
.build()
)

# get Yoti response
response = signed_request.execute()
response_payload = json.loads(response.text)

Event

Description

CONFIG_FIRST_LOADED

The user has successfully landed on the starting screen.

RESOURCE_CREATED

A resource has successfully been created. e.g a document image has been captured.

CLIENT_SESSION_TOKEN_DELETED

User journey has been completed.

Example Response

[
{
"event": "CONFIG_FIRST_LOADED",
"created": "2024-07-24T14:15:06Z",
"device": {
"ip_address": "",
"manufacture_name": "Apple",
"model_name": "Macintosh",
"os_name": "Mac OS",
"os_version": "10.15.7",
"browser_name": "Chrome",
"browser_version": "126.0.0.0",
"locale": "en-GB",
"client_version": ""
}
},
{
"event": "RESOURCE_CREATED",
"resource_id": "a10cce10-c497-4011-8eab-4759e1f6fe49",
"created": "2024-07-24T14:15:10Z",
"device": {
"ip_address": "",
"manufacture_name": "Apple",
"model_name": "Macintosh",

These device details can also be deleted by using the method below:

await idvClient.deleteSessionTrackedDevices(sessionId);
<?php
use Yoti\Http\RequestBuilder;
use Yoti\Http\Payload;
$request = (new RequestBuilder())
->withBaseUrl('https://api.yoti.com/idverify/v1')
->withPemFilePath('<YOTI_KEY_FILE_PATH>')
->withEndpoint('/sessions/<session_ID>/tracked-devices')
->withMethod('DELETE')
->withQueryParam('sdkId', '<YOTI_CLIENT_SDK_ID>')
->build()
//get Yoti Response
->execute();
from yoti_python_sdk.http import SignedRequest, RequestHandler
import json
import requests

def execute(request):
response = requests.request(
url=request.url, data=request.data, headers=request.headers, method=request.method)
return response.content

def delete_tracked_devices():

signed_request = (
SignedRequest
.builder()
.with_pem_file("<YOTI_KEY_FILE_PATH>")
.with_base_url("https://api.yoti.com/idverify/v1")
.with_endpoint("/sessions/<SESSION_ID>/tracked-devices")
.with_http_method("DELETE")
.with_param("sdkId", "<YOTI_CLIENT_SDK_ID>")
.build()
)

# get Yoti response
response = signed_request.execute()