Retrieve results

Each session has a configured 'time to live' (TTL) which must be above 300 seconds (5 minutes). When a session is created, it remains active until its 'time to live' is reached. For any active session, you can use the Yoti SDK to retrieve a report on the session (containing the end-user's uploaded documents and associated metadata).

Recommendation
Yoti strongly recommends you use notifications for each session status.

This page explains how to:

  • Retrieve the results of the session.
  • Retrieve the associated media.
  • Display the Identity Profile Report for the session.

Result of the session

Session retrieval requires a session ID, this is generated from the create a session endpoint. Below is a basic example of what retrieving a session looks like:

Javascript
Java
PHP
C#
Go
Copy

The following are present in every session result:

ValueDescription
State

The current state of the session. It provides the overall state of the session.

You can search through session results prior to this being completed, but some checks may not have been processed yet.

ResourcesA container of all ID documents and liveness captures for this session.
ChecksA container of all checks performed for this session.

Retrieve the Media

Document images from the user, text extraction fields and liveness captures for the session are available inside the resources container. These can be retrieved by looking at the relevant media ID inside the documents collection.

Javascript
Java
PHP
C#
Go
Copy

Retrieve the Identity Profile

Once the session has reached the state of 'Completed', identity profile can be successfully retrieved.

In case of a successful transaction, once the identity profile is received, the identity profile report JSON will be accessible. This contains the media ID which can then be used to get the full JSON response of the report.

Javascript
Java
PHP
C#
Go
Copy
Jump to..
Get a deeper dive on the identity profile and understanding the report.

Session Result Parameters

The session result contains the session metadata, ID checks, uploaded documents and the identity profile report.

ParameterTypeDescriptionIncluded
SessionResultObjectComplete Session ResultAlways
sessionIdStringUnique Session IDAlways
userTrackingIdStringUnique User Tracking IDOptional
stateString

The current state of the session.

Enum: ONGOING, COMPLETED, EXPIRED

Always
clientSessionTokenStringToken for the user session.Optional
clientSessionTokenTtlIntegerRemaining time the user has to complete the session.Optional
checks[]ObjectList of all the checks performed.Always
resourcesObjectCollection of all the resources created.Always
biometricConsentStringCollected biometric consent.Conditional
identityProfileObject

Complete Identity profile

(Available when the session is completed).

Always
subjectIdStringSubject identifier provided by the RP at session creation time.Optional
resultString

Final result of the identity verification.

'Done' means the identity could be verified and the identity profile report provided. 'Aborted' means the user could not be verified and no identity profile report produced, all the resources and checks are still available.

Enum: DONE, ABORTED

Always
failureReasonObjectIn case of result: ABORTED, reason for the failure.Optional
reasonCodeStringReason code for the failure. Please see error codes for full listConditional
identityProfileReportObjectThe identity profile report media contains the identity attributes and the verification report that certifies the scheme compliance and achieved verification level.Conditional
trustFrameworkString

Defines under which trust framework this identity was verified. As defined at session creation time.

Enum: UK_TFIDA, YOTI_GLOBAL

Conditional
schemesCompliance[]ObjectDefines which schemes (of the requested ones) this identity profile satisfies.Conditional
schemeBooleanScheme defines the identity scheme.Conditional
requirementsMetStringAsserts whether the identity scheme requirements were met or not.Conditional
requirementsNotMetInfoObjectProvides info on why the scheme requirements were not met.Conditional
mediaStringFull identity profile report provided as a JSON media.Conditional
createdStringUses the ISO8601 standard representation of date times.Conditional
last_updatedStringUses the ISO8601 standard representation of date times.Conditional
idStringIdentifier to be used to fetch this media.Conditional
typeStringJSON Enum: IMAGE, JSON,BINARYConditional

Example JSON Response

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard