Get Face Match images
curl --request GET \
--url http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image', 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 => "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyFace Match
Get Face Match images
Download the document and selfie images for a Face Match verification β in the gu1 KYC API for identity verification flows, with examples for face match images.
GET
/
api
/
kyc
/
face-match
/
verifications
/
{id}
/
document-image
Get Face Match images
curl --request GET \
--url http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image \
--header 'Authorization: Bearer <token>'import requests
url = "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image', 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 => "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.gu1.ai/api/kyc/face-match/verifications/{id}/document-image")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOverview
After a successful Face Match request, you can download the document and selfie that were submitted by calling the two GET endpoints below. Use the sameverificationId (UUID) returned in the POST response (or the id from GET verification). Use the same Authorization: Bearer API key and read KYC permission as for other Face Match routes.
If a copy of an image was not kept for that verification, the corresponding endpoint returns 404 (for example when storage failed during the run).
Endpoints
Document image
GET https://api.gu1.ai/api/kyc/face-match/verifications/{verificationId}/document-image
Selfie image
GET https://api.gu1.ai/api/kyc/face-match/verifications/{verificationId}/selfie-image
Path parameters
string
required
UUID of the Face Match verification (same as
verificationId from POST or id from GET one/list).Headers
Authorization:Bearer YOUR_API_KEY(required)
X-Organization-Id if your account is organization-scoped.
Responses
| HTTP | Description |
|---|---|
| 200 | Raw image bytes (Content-Type e.g. image/jpeg, image/png). |
| 404 | Verification not found, not in your organization, or that image is not available for download. |
Examples
# Document (reference image sent in POST)
curl -sS -o document.jpg \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://api.gu1.ai/api/kyc/face-match/verifications/VERIFICATION_UUID/document-image"
# Selfie
curl -sS -o selfie.jpg \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://api.gu1.ai/api/kyc/face-match/verifications/VERIFICATION_UUID/selfie-image"
Related
Was this page helpful?