Backend - Session Get Service Response Evaluation: Liveness Score and Anti-Spoofing Validity Interpretation¶
Purpose¶
The flow diagram created in Excalidraw will be added below.
This document explains how to retrieve the face verification results from the Enqualify backend after the face flow is completed in the Mobile SDK.
Flow Diagram¶

Flow Description:
- Mobile → Your Backend: the user sends a face comparison request including the Reference.
-
Your Backend → Enqualify Backend: obtain Auth/Token, call Integration/Get with the Reference, then call Session/Get using the returned SessionUId.
-
Obtain Auth/Token (authentication).
- Call
Integration/Getusing the Reference. - Using the returned
SessionUId, callSession/Get. - Your Backend → Mobile: once all steps are complete, return the final result to the user.
Authentication (Auth Token)¶
Use this endpoint to obtain a JWT for subsequent Enqualify API calls. Send the token as a Bearer token in the Authorization header. Expires and Validity indicate when the token expires.
Endpoint¶
Response¶
Request¶
{
"IsSuccessful": true,
"ReferenceId": "d53f868c-f0a4-4194-b754-9b16e38bc52f",
"User": {
"UserId": 19,
"UserName": "app",
"UserRole": "App",
"UserPartyId": 24,
"UserPartyType": "Person",
"DomainId": 19,
"DomainCode": "19",
"DomainName": "app",
"DomainType": "User",
"DomainRole": "App",
"DomainPartyId": 24,
"DomainPartyType": "Person",
"Name": "app",
"FirstName": "app",
"LastName": null,
"Profile": {
"Locale": "TR",
"Image": null,
"SecurityImage": null
},
"StaffId": null,
"StaffCode": null,
"History": null
},
"Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkF1dGgifQ.eyJyb2xlIjpbIkFwcCIsIlVzZXIiLCJBcHAiXSwiSW5zdGFuY2UiOiJBWWRidTBVNmcreG5WUGpPOGkzMSIsIm5iZiI6MTc3NTAzMDM4MCwiZXhwIjoxNzc3NjIyNDQwLCJpYXQiOjE3NzUwMzAzODAsImlzcyI6IkVucXVyYSIsImF1ZCI6IkVuUXVhbGlmeSJ9.dqXnlabGsH0m9gjQ8gwvirpu6Pgk6iYXQb4htkKoQJk",
"ServerKey": null,
"Expires": "2026-05-01T08:00:40.6807485Z",
"Validity": "2026-05-01T08:00:40.6807485Z"
}
Integration Get Service¶
Session Get Service¶
This service returns the complete verification session by its SessionUId, which you obtain from Integration/Get (or via webhooks). Use it to fetch the final face verification result and, optionally, include additional data using the load flags:
This service retrieves verification session details from Enqualify. The SessionUId in the response is required for subsequent Session/Get calls to fetch the final face verification results.
Endpoint¶
Request¶
{
"Types": [
"Session"
],
"Reference": "39693438-F989-4222-9214-CCBF7E191455",
"Statuses": [
"None", "Waiting", "Active", "Completed"
]
}
Response¶
{
"IsSuccessful": true,
"ReferenceId": "ae7e0441-a022-4042-a08d-b852b9e3c9bd",
"Data": [
{
"UId": "3d755420-fc92-4000-a44d-372413a80efd",
"Type": "Session",
"Reference": "39693438-F989-4222-9214-CCBF7E191419",
"CallType": "NewCustomer",
"SessionUId": "d83af3a1-e3de-4d04-a460-f58ee79993ac",
"IDRegistration": {
"FatherName": "Enqura",
"MotherName": "Enqrua",
"BirthPlace": "Istanbul",
"RegistrationPlace": "",
"RegistrationPlaceFamilyRow": "1",
"RegistrationPlacePersonalRow": "1",
"SerialNo": "1",
"RecordNo": "1",
"IdentityType": "T.C. Kimlik Kartı",
"IdentityNo": "304******",
"DocumentNo": "1234567890",
"Name": "EM****",
"Surname": "KA****",
"Gender": "Erkek",
"BirthDate": "24.11.2014",
"Nationality": "TR",
"IssuedBy": "Enqura",
"IssuedDate": "24.11.2028",
"ExpireDate": "24.11.2028"
},
"AddressRegistration": {
"AddressType": "Ev",
"District": "Türkiye",
"DistrictCode": 1,
"Street": "Türkiye",
"StreetCode": 1,
"VillageCode": 1,
"AddressDetail": "Türkiye",
"TownCode": 1,
"Town": "Türkiye",
"City": "Türkiye",
"CityCode": 1,
"Country": "Türkiye",
"CountryCode": 1
},
"IdentityType": "T.C. Kimlik Kartı",
"IdentityNo": "304********",
"Phone": "05399999999",
"Email": "info@enqura.com",
"Data": "{\"VideoKayıtOnayı\":\"Alındı\",\"KvkkOnayı\":\"Alındı\"}",
"Status": "Active"
}
]
}
Session Get Service: Retrieves the complete verification session using the SessionUId returned by Integration/Get (or provided via webhooks). Use the optional load flags to control the payload size and detail level:
Session Get Service¶
Use this endpoint to retrieve the full verification session by its SessionUId, returned by Integration/Get or provided via webhooks. You can include additional information by toggling the load flags:
Session Get Service¶
Endpoint¶
Request¶
{
"SessionUId": "C7FC0258-8BEA-4FAF-AFE4-78C31423FCB9", //Webhooks ile göndereceğimiz Guid Değer.
"LoadDetails": true,
"LoadContent": true, //OCR,NFC ve FACE görselleri dahil edilsin mi?
"LoadLogs": true, //Call Loglar dahil edilsinmi
"RoomId": null,
"VideoId": null
}
Response¶
{
"IsSuccessful": true,
"ReferenceId": "301a6fdc-e7a6-4008-9e3b-b9a042956b96",
"Data": {
"UId": "C7FC0258-8BEA-4FAF-AFE4-78C31423FCB9",
"Type": "NewCustomer",
"DateTime": "2025-01-02T08:30:32.0833333",
"DomainUId": "4d81c629-5e6b-4e5a-9bdc-7653d8dbfc02",
"RoomId": "I82B8BFB2FD563F1D",
"VideoId": null,
"IdentityType": "T.C. Kimlik Kartı",
"IdentityNo": "551********",
"Name": "BU***",
"Surname": "****AL",
"Phone": "5555555555",
"Email": "enqura@enqura.com",
"NFCExists": true,
"NFCVerified": true,
"CanAutoClose": false,
"AutoClosed": false,
"Status": "Closed",
"StartDate": "2025-01-02T08:33:34.4266667",
"LiveDate": "2025-01-02T08:33:56.38",
"FinishDate": "2025-01-02T08:36:48.69",
"CloseDate": "2025-01-02T08:36:55.0733333",
"ModifyDate": "2025-01-02T08:36:55.08",
"Category": null,
"FaceUId": "6bf970df-291c-48b9-b664-03052a3501e7",
"FrontBirthDate": null,
"FrontDocumentNo": null,
"FrontExpireDate": null,
"Face": {
"UId": "6bf970df-291c-48b9-b664-03052a3501e7",
"SessionUId": "C7FC0258-8BEA-4FAF-AFE4-78C31423FCB9",
"DateTime": "2025-01-02T08:32:48.74",
"Distance": 0.5451361536979675,
"Confidence": 69,
"ChipDistance": 0.5270265340805054,
"ChipConfidence": 77,
"LeftEyeCloseConfidence": 0.9735329151153564,
"RightEyeCloseConfidence": 0.978675127029419,
"SmilingConfidence": 0.9863819479942322,
"LivenessScore": 0.9825285375118256,
"DistanceMin": 0.6,
"DistanceMax": 0.6,
"DistanceValidityLevel": 1,
"ChipDistanceMin": 0.6,
"ChipDistanceMax": 0.6,
"ChipDistanceValidityLevel": 1,
"LivenessScoreValue": 0.7,
"LivenessScoreValidityLevel": 1,
"ValidityLevel": 1,
"AntiSpoofing": 0.998,
"AntiSpoofingValidityLevel": 1, // 1 - 2 Success
"AntiSpoofingMin": 0.85,
"AntiSpoofingMax": 0.9,
"DegreeFaceRight": null,
"DegreeFaceLeft": null,
"DegreeFaceUp": null,
"FaceRightConfidence": null,
"FaceLeftConfidence": null,
"FaceUpConfidence": null,
"FaceDocumentUId": "b04c89b9-e98b-438b-8c31-ba289062566b",
"SmilingCaptureDocumentUId": "ca49686e-ab54-49f1-ab0b-f425cb195eda",
"EyeCloseCaptureDocumentUId": "b2bdb170-57ae-43c7-ba06-9f1b44ee6c31",
"EyeCloseIntervalCaptureDocumentUId": null,
"EyeOpenIntervalCaptureDocumentUId": null,
"FaceRightCaptureDocumentUId": null,
"FaceLeftCaptureDocumentUId": null,
"FaceUpCaptureDocumentUId": null,
"ModifyDate": "2025-01-02T08:32:48.7733333",
"FaceDocument": {
"UId": "b04c89b9-e98b-438b-8c31-ba289062566b",
"Type": "Image",
"SubjectType": "Face",
"Category": "None",
"Notes": null,
"DocumentUId": "5e73c6de-be93-448d-b4d5-f0fdf4f329dd",
"Document": {
"UId": "5e73c6de-be93-448d-b4d5-f0fdf4f329dd",
"FolderUId": "ebe242c1-e39b-47f1-b985-6a67e30b2540",
"Name": "facedocument92891c23d397439d8f7e884b232c2cb1.jpg",
"Type": "Image",
"SubjectType": "Face",
"Title": "facedocument92891c23d397439d8f7e884b232c2cb1.jpg",
"Locale": null,
"Mime": "image/jpeg",
"State": "Active",
"Content": {
"UId": "24ed80be-316f-4faf-8ab7-b736aff14190",
"DocumentUId": "5e73c6de-be93-448d-b4d5-f0fdf4f329dd",
"Name": "facedocument92891c23d397439d8f7e884b232c2cb1.jpg",
"Version": null,
"Length": 10507,
"Storage": null,
"Path": null,
"Text": null,
"Binary": "base64",
"State": "Active"
}
}
},
"SmilingCaptureDocument": {
"UId": "ca49686e-ab54-49f1-ab0b-f425cb195eda",
"Type": "Image",
"SubjectType": "SmilingCapture",
"Category": "None",
"Notes": null,
"DocumentUId": "bdb2c7b7-6574-47bc-8721-4b0a74e5c2e5",
"Document": {
"UId": "bdb2c7b7-6574-47bc-8721-4b0a74e5c2e5",
"FolderUId": "ebe242c1-e39b-47f1-b985-6a67e30b2540",
"Name": "smilingCaptureContenta4dba7adeaf54527b7b807a7d557bd38.jpg",
"Type": "Image",
"SubjectType": "SmilingCapture",
"Title": "smilingCaptureContenta4dba7adeaf54527b7b807a7d557bd38.jpg",
"Locale": null,
"Mime": "image/jpeg",
"State": "Active",
"Content": {
"UId": "410c978c-c641-46ab-86e7-0af6064dc51a",
"DocumentUId": "bdb2c7b7-6574-47bc-8721-4b0a74e5c2e5",
"Name": "smilingCaptureContenta4dba7adeaf54527b7b807a7d557bd38.jpg",
"Version": null,
"Length": 10181,
"Storage": null,
"Path": null,
"Text": null,
"Binary": "base64",
"State": "Active"
}
}
},
"EyeCloseCaptureDocument": {
"UId": "b2bdb170-57ae-43c7-ba06-9f1b44ee6c31",
"Type": "Image",
"SubjectType": "EyeCloseCapture",
"Category": "None",
"Notes": null,
"DocumentUId": "5cf27e8c-d51f-4ce9-a6db-d25e55497add",
"Document": {
"UId": "5cf27e8c-d51f-4ce9-a6db-d25e55497add",
"FolderUId": "ebe242c1-e39b-47f1-b985-6a67e30b2540",
"Name": "eyeCloseCaptureDocument5e646f5d9a304af4842a40d090dfed9c.jpg",
"Type": "Image",
"SubjectType": "EyeCloseCapture",
"Title": "eyeCloseCaptureDocument5e646f5d9a304af4842a40d090dfed9c.jpg",
"Locale": null,
"Mime": "image/jpeg",
"State": "Active",
"Content": {
"UId": "a02816d8-ccef-447b-8bb1-c4712ec55fbe",
"DocumentUId": "5cf27e8c-d51f-4ce9-a6db-d25e55497add",
"Name": "eyeCloseCaptureDocument5e646f5d9a304af4842a40d090dfed9c.jpg",
"Version": null,
"Length": 8866,
"Storage": null,
"Path": null,
"Text": null,
"Binary": "base64",
"State": "Active"
}
}
}
},
"SignList": [],
"HasScreenRecordVideo": false
}
}
Response Interpretation: When evaluating the Session Get Service response, pay attention to these fields:
- data.Face.LivenessScore and data.Face.LivenessScoreValidityLevel:
- LivenessScore → treat values ≥ 0.7 as a successful liveness check.
- LivenessScoreValidityLevel → if you prefer Enqualify's backend interpretation, rely on this field:
1 or 2 = success, 0 = failure - data.Face.AntiSpoofingValidityLevel:
- Interpretation →
1 or 2 = success, 0 = failure - data.HasScreenRecordVideo:
- Boolean flag indicating whether the face step's screen recording was captured successfully (
true = recorded, false = not recorded).