v5

latestSwagger 2.02026-07-136680294.1 KB

Create a new detect liveness session.

A session is best for client device scenarios where developers want to authorize a client device to perform only a liveness detection without granting full access to their resource. Created sessions have a limited life span and only authorize clients to perform the desired action before access is expired.

Permissions includes...

    • A token lifetime of 10 minutes.

[!NOTE] Client access can be revoked by deleting the session using the Delete Liveness Session operation. To retrieve a result, use the Get Liveness Session. To audit the individual requests that a client has made to your resource, use the List Liveness Session Audit Entries.

post/detectLiveness-sessions

Request body

livenessOperationMode'Passive' | 'PassiveActive' required

The liveness operation mode to drive the client's end-user experience.

deviceCorrelationIdSetInClientboolean

Whether or not to allow client to set their own 'deviceCorrelationId' via the Vision SDK. Default is false, and 'deviceCorrelationId' must be set in this request body.

enableSessionImageboolean

Whether or not store the session image.

livenessModelVersion'2024-11-15'

The model version used for liveness classification.

deviceCorrelationIdstring

Unique Guid per each end-user device. This is to provide rate limiting and anti-hammering. If 'deviceCorrelationIdSetInClient' is true in this request, this 'deviceCorrelationId' must be null.

authTokenTimeToLiveInSecondsinteger

Seconds the session should last for. Range is 60 to 86400 seconds. Default value is 600.

numberOfClientAttemptsAllowedobject

The number of times a client can attempt a liveness check using the same authToken. Default value is 1. Maximum value is 3.

userCorrelationIdstring

Unique Guid per each end-user. This is to provide rate limiting and anti-hammering. If 'userCorrelationIdSetInClient' is true in this request, this 'userCorrelationId' must be null.

userCorrelationIdSetInClientboolean

Whether or not to allow client to set their own 'userCorrelationId' via the Vision SDK. Default is false, and 'userCorrelationId' must be set in this request body.

expectedClientIpAddressstring

Specify the expected IP address or CIDR block of the client that runs the liveness check.

Response

A successful call create a session for a client device and provide an authorization token for use by the client application for a limited purpose and time.

sessionIdstring required

The unique ID to reference this session.

authTokenstring required

Bearer token to provide authentication for the Vision SDK running on a client application. This Bearer token has limited permissions to perform only the required action and expires after the TTL time. It is also auditable.

status'NotStarted' | 'Running' | 'Succeeded' | 'Failed' | 'Canceled' required

Enum describing allowed operation states.

modelVersion'2024-11-15'

The model version used for liveness classification.

isAbuseMonitoringEnabledobject

Denotes if the abuse monitoring feature was enabled during this session.

expectedClientIpAddressstring

The expected IP address or CIDR block of the client that runs the liveness check.