API Documentation
Face and ID Card Verification for KYC API
Face and ID Card Verification
POST
https://api.iapp.co.th/face-verify-id/facecheck
This URL allows you to verify faces and ID Card.
Headers
Name
Type
Description
apikey*
String
The API Key to call this API
Request Body
Name
Type
Description
file1*
File
The binary data of the image
file2*
File
The binary data of the image
{
"message": "successfully performed",
"process_time": 0.3729121685028076,
"result": "matched",
"similarity_score": 0.5220710916461694
}
{
"message": "successfully performed",
"process_time": 0.2623169422149658,
"result": "not matched",
"similarity_score": 0.052153867628360495
}
Parameter in Response
Name
Type
Description
idcard
Dict
Confidence Score and isSamePerson( True or False) of ID Card
selfie
Dict
Confidence Score and isSamePerson( True or False) of selfie
time_process
String
The Processing Time
total
Dict
Summary of Confidence Score and isSamePerson result
Sample Requests
curl --location 'https://api.iapp.co.th/face-verify-id/facecheck' \
--header 'apikey: {{apikey}}' \
--form 'file0=@"cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png"' \
--form 'file1=@"08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png"'
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.iapp.co.th/face-verify-id/facecheck")
.header("apikey", "{{apikey}}")
.field("file", new File("cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png"))
.field("file", new File("08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png"))
.asString();
var request = require('request');
var fs = require('fs');
var options = {
'method': 'POST',
'url': 'https://api.iapp.co.th/face-verify-id/facecheck',
'headers': {
'apikey': '{{apikey}}'
},
formData: {
'file0': {
'value': fs.createReadStream('cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png'),
'options': {
'filename': '',
'contentType': null
}
},
'file1': {
'value': fs.createReadStream('08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png'),
'options': {
'filename': '',
'contentType': null
}
}
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/face-verify-id/facecheck"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"{{apikey}}"
};
[request setAllHTTPHeaderFields:headers];
NSArray *parameters = @[
@{ @"name": @"file0", @"fileName": @"cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png" },
@{ @"name": @"file1", @"fileName": @"08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png" }
];
NSString *boundary = @"----WebKitFormBoundary7MA4YWxkTrZu0gW";
NSError *error;
NSMutableString *body = [NSMutableString string];
for (NSDictionary *param in parameters) {
[body appendFormat:@"--%@\r\n", boundary];
if (param[@"fileName"]) {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"; filename=\"%@\"\r\n", param[@"name"], param[@"fileName"]];
[body appendFormat:@"Content-Type: %@\r\n\r\n", param[@"contentType"]];
[body appendFormat:@"%@", [NSString stringWithContentsOfFile:param[@"fileName"] encoding:NSUTF8StringEncoding error:&error]];
if (error) {
NSLog(@"%@", error);
}
} else {
[body appendFormat:@"Content-Disposition:form-data; name=\"%@\"\r\n\r\n", param[@"name"]];
[body appendFormat:@"%@", param[@"value"]];
}
}
[body appendFormat:@"\r\n--%@--\r\n", boundary];
NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];
[request setHTTPBody:postData];
[request setHTTPMethod:@"POST"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://api.iapp.co.th/face-verify-id/facecheck');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '{{apikey}}'
));
$request->addUpload('file0', 'cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png', '[PROXY]', '<Content-Type Header>');
$request->addUpload('file1', '08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png', '[PROXY]', '<Content-Type Header>');
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
import requests
url = "https://api.iapp.co.th/face_compare"
# Use default score
payload={}
# Use score of each company
payload={'company': '{Your Company Name}'}
# Use default score
payload={'min_score': '{Your Minimun Score}'}
files=[
('file1',('{Your Image File Name 1}',open('{Your Image File Path 1}','rb'),'application/octet-stream')),
('file2',('{Your Image File Name 2}',open('{Your Image File Path 2}','rb'),'application/octet-stream'))
]
headers = {
'apikey': '{Your API Key}'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
// Configure Score
curl --location -g --request GET 'https://api.iapp.co.th/face_config_score?detection={Detection Value}&comparison={Comparison Value}&company={Your Company Name}&password={Your Company Password}' \
--header 'apikey: {Your API Key}'
// Show Score
curl --location -g --request GET 'https://api.iapp.co.th/face_config_score?detection&comparison&company={Your Company Name}&password={Your Company Password}' \
--header 'apikey: {Your API Key}'
Unirest.setTimeouts(0, 0);
// Configure Score
HttpResponse<String> response = Unirest.get("https://api.iapp.co.th/face_config_score?detection={Detection Value}&comparison={Comparison Value}&company={Your Company Name}&password={Your Company Password}")
.header("apikey", "{Your API Key}")
.multiPartContent()
.asString();
// Show Score
HttpResponse<String> response = Unirest.get("https://api.iapp.co.th/face_config_score?detection&comparison&company={Your Company Name}&password={Your Company Password}")
.header("apikey", "{Your API Key}")
.multiPartContent()
.asString();
var request = require('request');
var options = {
'method': 'GET',
// Configure Score
'url': 'https://api.iapp.co.th/face_config_score?detection={Detection Value}&comparison={Comparison Value}&company={Your Company Name}&password={Your Company Password}',
// Show Score
'url': 'https://api.iapp.co.th/face_config_score?detection&comparison&company={Your Company Name}&password={Your Company Password}',
'headers': {
'apikey': '{Your API Key}'
},
formData: {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
#import <Foundation/Foundation.h>
dispatch_semaphore_t sema = dispatch_semaphore_create(0);
// Configure Score
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/face_config_score?detection={Detection Value}&comparison={Comparison Value}&company={Your Company Name}&password={Your Company Password}"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
// Show Score
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://api.iapp.co.th/face_config_score?detection&comparison&company={Your Company Name}&password={Your Company Password}"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
NSDictionary *headers = @{
@"apikey": @"{Your API Key}"
};
[request setAllHTTPHeaderFields:headers];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
dispatch_semaphore_signal(sema);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSError *parseError = nil;
NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
NSLog(@"%@",responseDictionary);
dispatch_semaphore_signal(sema);
}
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
// Configure Score
$request->setUrl('https://api.iapp.co.th/face_config_score?detection={Detection Value}&comparison={Comparison Value}&company={Your Company Name}&password={Your Company Password}');
// Show Score
$request->setUrl('https://api.iapp.co.th/face_config_score?detection&comparison&company={Your Company Name}&password={Your Company Password}');
$request->setMethod(HTTP_Request2::METHOD_GET);
$request->setConfig(array(
'follow_redirects' => TRUE
));
$request->setHeader(array(
'apikey' => '{Your API Key}'
));
try {
$response = $request->send();
if ($response->getStatus() == 200) {
echo $response->getBody();
}
else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
}
}
catch(HTTP_Request2_Exception $e) {
echo 'Error: ' . $e->getMessage();
}
import requests
url = "https://api.iapp.co.th/face-verify-id/facecheck"
payload = {}
files=[
('file0',('Screen Shot 2566-09-14 at 17.28.16.png',open('cvKeFw0VP/Screen Shot 2566-09-14 at 17.28.16.png','rb'),'image/png')),
('file1',('Screen Shot 2566-09-14 at 17.28.23.png',open('08v_eIUDh/Screen Shot 2566-09-14 at 17.28.23.png','rb'),'image/png'))
]
headers = {
'apikey': '{{apikey}}'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Last updated