/EnhancedLiveness
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new MultipartFormDataContent { new StringContent("") { Headers = { ContentType = new MediaTypeHeaderValue("application/octet-stream"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "Packet", FileName = "file", } } }, new StringContent("{ \"additionalProperty\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "AdditionalDetails", } } }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Packet\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalDetails\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Packet\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalDetails\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n");Request request = new Request.Builder() .url("https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001") .build();
Response response = client.newCall(request).execute();const url = 'https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness';const form = new FormData();form.append('Packet', 'file');form.append('AdditionalDetails', '{ "additionalProperty": "example" }');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001")val body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"Packet\"; filename=\"file\"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalDetails\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n")val request = Request.Builder() .url("https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001") .build()
val response = client.newCall(request).execute()curl --request POST \ --url https://liveness-v2-eu.core.idscan.cloud/EnhancedLiveness \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form Packet=@file \ --form 'AdditionalDetails={ "additionalProperty": "example" }'The Enhanced Liveness service detects the most threatening attack vectors: virtual cameras, external devices, browser attacks, network attacks. The service is able to stop a variety of attack content: 3D rendering, face morphing, face swap, cheap fake, deep fake.
Documents and Biometrics Core Enhanced Liveness endpoint allows for an encrypted packet containing photograph and the environment metadata to be uploaded for processing to determine the probability that the end user was present at the time of capture, and also detect any threatening injection attacks (Please reach out to your support representative for the “Documents Biometrics Liveness Guide” for further guidance on authentication). The endpoint will return a result after processing. The response contains CaptureScore, in the range of 0 to 1 and LivenessScore in the range of 0 to 100. The results is a score value between 0 and 100, with a score of 50 and above been considered a pass.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Correlation Id for the request
Request Body
Section titled “Request Body”object
The generated encrypted packet contains image and other metadata to detect the enhanced liveness.
Key value pair to include any additional metadata for the request.
object
Responses
Section titled “Responses”Returns a success on the Endpoint after processing the submitted Encrypted packet.This code does not indicate a success on the enhanced liveness detection of the request packet itself but rather a success on the call to the endpoint.The Enhanced Liveness detection result is in the response body (See Response Body section below).
Represents the response returned by the enhanced liveness verification service. Inherits from DocsBio.Liveness.Facade.Contracts.BaseVerifyEnhancedLiveness.
object
Captures the Liveness score. Accepted values are in the range between 0 - 1.
Validation result score from the liveness provider. Accepted values are in the range of 0 - 100. The value is unbounded, the bigger the score the higher the image’s liveness. Score of 50 and above is considered a pass.
Enhanced Liveness result as pass or fail based on the attack probability. Score of 50 and above is considered a pass.
Additional details provided by the liveness provider. It might contain information such as extracted image ID or other metadata.
object
Contains the image extracted from the liveness verification process.
Represents the response returned by the enhanced liveness verification service. Inherits from DocsBio.Liveness.Facade.Contracts.BaseVerifyEnhancedLiveness.
object
Captures the Liveness score. Accepted values are in the range between 0 - 1.
Validation result score from the liveness provider. Accepted values are in the range of 0 - 100. The value is unbounded, the bigger the score the higher the image’s liveness. Score of 50 and above is considered a pass.
Enhanced Liveness result as pass or fail based on the attack probability. Score of 50 and above is considered a pass.
Additional details provided by the liveness provider. It might contain information such as extracted image ID or other metadata.
object
Contains the image extracted from the liveness verification process.
Example generated
{ "captureScore": 1, "livenessScore": 1, "result": "example", "additionalDetails": { "additionalProperty": "example" }, "extractedImage": "example"}Represents the response returned by the enhanced liveness verification service. Inherits from DocsBio.Liveness.Facade.Contracts.BaseVerifyEnhancedLiveness.
object
Captures the Liveness score. Accepted values are in the range between 0 - 1.
Validation result score from the liveness provider. Accepted values are in the range of 0 - 100. The value is unbounded, the bigger the score the higher the image’s liveness. Score of 50 and above is considered a pass.
Enhanced Liveness result as pass or fail based on the attack probability. Score of 50 and above is considered a pass.
Additional details provided by the liveness provider. It might contain information such as extracted image ID or other metadata.
object
Contains the image extracted from the liveness verification process.
Example generated
{ "captureScore": 1, "livenessScore": 1, "result": "example", "additionalDetails": { "additionalProperty": "example" }, "extractedImage": "example"}Error with the provided parameters, please, check the response provided to get more insights on the problem.
object
object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}Internal error during our processing, please, get in touch with support so we can help you.
object
object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}object
Example generated
{ "errorMessage": "example", "errors": [ "example" ]}