/FaceMatch/Id
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new MultipartFormDataContent { new StringContent("example") { Headers = { ContentType = new MediaTypeHeaderValue("text/plain"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "FirstFaceImageId", } } }, new StringContent("example") { Headers = { ContentType = new MediaTypeHeaderValue("text/plain"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "SecondFaceImageId", } } }, new StringContent("{ \"additionalProperty\": \"example\" }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json"), ContentDisposition = new ContentDispositionHeaderValue("form-data") { Name = "AdditionalData", } } }, },};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://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"FirstFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"SecondFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalData\"\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=\"FirstFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"SecondFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalData\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n");Request request = new Request.Builder() .url("https://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id") .post(body) .addHeader("Authorization", "Bearer <token>") .addHeader("Content-Type", "multipart/form-data; boundary=---011000010111000001101001") .build();
Response response = client.newCall(request).execute();const url = 'https://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id';const form = new FormData();form.append('FirstFaceImageId', 'example');form.append('SecondFaceImageId', 'example');form.append('AdditionalData', '{ "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=\"FirstFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"SecondFaceImageId\"\r\nContent-Type: text/plain\r\n\r\nexample\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"AdditionalData\"\r\nContent-Type: application/json\r\n\r\n{ \"additionalProperty\": \"example\" }\r\n-----011000010111000001101001--\r\n")val request = Request.Builder() .url("https://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id") .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://facematch-v2-eu.core.idscan.cloud/FaceMatch/Id \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form FirstFaceImageId=example \ --form SecondFaceImageId=example \ --form 'AdditionalData={ "additionalProperty": "example" }'Determines the similarity score between two facial biometric images, with provided image ids, where images are stored in cache/store.
The Documents and Biometrics Core FaceMatch Service endpoint allows for two portrait image ids(selfie/face images) to be uploaded for comparison against each other. The endpoint will return a result after processing.The score is a value between 0 and 1, where score value of 0.8 or above is considered a Matched result, and score below 0.8 is a Not Matched result.
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
Image id of the first face image to be matched.
Image id of the second face image to be matched.
Key value pair for request configurations, for any additional data to be passed.
object
Responses
Section titled “Responses”Returns a success on the Endpoint after processing the submitted facial images.This code does not indicate a success on the validation of the facial images themselves but rather a success on the call to the Endpoint. The face match result is in the response body (See Response Body section below).
Response of the face match service.
object
Matching score of the query faces.
Result of the match. Sets value of Matched, or Not Matched.
Any additional details in key value pair.
object
Response of the face match service.
object
Matching score of the query faces.
Result of the match. Sets value of Matched, or Not Matched.
Any additional details in key value pair.
object
Example generated
{ "score": 1, "result": "example", "additionalDetails": { "additionalProperty": "example" }}Response of the face match service.
object
Matching score of the query faces.
Result of the match. Sets value of Matched, or Not Matched.
Any additional details in key value pair.
object
Example generated
{ "score": 1, "result": "example", "additionalDetails": { "additionalProperty": "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" ]}