Face Match
Enroll Account
Enroll Account
curl --request POST \
--url https://api.sandbox.verisoul.ai/liveness/enroll \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"session_id": "0007b793-ae5d-45a2-8d9f-4a5b573c3271",
"account_id": "example-account-id"
}
'import requests
url = "https://api.sandbox.verisoul.ai/liveness/enroll"
payload = {
"session_id": "0007b793-ae5d-45a2-8d9f-4a5b573c3271",
"account_id": "example-account-id"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: '0007b793-ae5d-45a2-8d9f-4a5b573c3271',
account_id: 'example-account-id'
})
};
fetch('https://api.sandbox.verisoul.ai/liveness/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.verisoul.ai/liveness/enroll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => '0007b793-ae5d-45a2-8d9f-4a5b573c3271',
'account_id' => 'example-account-id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.verisoul.ai/liveness/enroll"
payload := strings.NewReader("{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.verisoul.ai/liveness/enroll")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.verisoul.ai/liveness/enroll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "8757569c-61e6-454b-afc9-59232e861496",
"success": true
}{
"request_id": "8e3c7dd6-73e3-4e46-bbd2-a10c322f59d5",
"success": false,
"error": "session_not_found"
}Authorizations
API key authentication
Body
application/json
⌘I
Enroll Account
curl --request POST \
--url https://api.sandbox.verisoul.ai/liveness/enroll \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"session_id": "0007b793-ae5d-45a2-8d9f-4a5b573c3271",
"account_id": "example-account-id"
}
'import requests
url = "https://api.sandbox.verisoul.ai/liveness/enroll"
payload = {
"session_id": "0007b793-ae5d-45a2-8d9f-4a5b573c3271",
"account_id": "example-account-id"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
session_id: '0007b793-ae5d-45a2-8d9f-4a5b573c3271',
account_id: 'example-account-id'
})
};
fetch('https://api.sandbox.verisoul.ai/liveness/enroll', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.verisoul.ai/liveness/enroll",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'session_id' => '0007b793-ae5d-45a2-8d9f-4a5b573c3271',
'account_id' => 'example-account-id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.verisoul.ai/liveness/enroll"
payload := strings.NewReader("{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sandbox.verisoul.ai/liveness/enroll")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.verisoul.ai/liveness/enroll")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"session_id\": \"0007b793-ae5d-45a2-8d9f-4a5b573c3271\",\n \"account_id\": \"example-account-id\"\n}"
response = http.request(request)
puts response.read_body{
"request_id": "8757569c-61e6-454b-afc9-59232e861496",
"success": true
}{
"request_id": "8e3c7dd6-73e3-4e46-bbd2-a10c322f59d5",
"success": false,
"error": "session_not_found"
}