KYC - Ghana
Verify International Passport
Verifies Ghanaian International Passports, including passport validation, facial matching, and data verification against government records.
POST
/
v2
/
api
/
identity
/
gh
/
passport
Verify International Passport
curl --request POST \
--url https://api.youverify.co/v2/api/identity/gh/passport \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "G0000603",
"metadata": {
"requestId": "1209348756"
},
"isSubjectConsent": true,
"validations": {
"data": {
"lastName": "AMPONG",
"firstName": "JAMES",
"dateOfBirth": "1998-06-26"
},
"selfie": {
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
}
}
'import requests
url = "https://api.youverify.co/v2/api/identity/gh/passport"
payload = {
"id": "G0000603",
"metadata": { "requestId": "1209348756" },
"isSubjectConsent": True,
"validations": {
"data": {
"lastName": "AMPONG",
"firstName": "JAMES",
"dateOfBirth": "1998-06-26"
},
"selfie": { "image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg" }
}
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'G0000603',
metadata: {requestId: '1209348756'},
isSubjectConsent: true,
validations: {
data: {lastName: 'AMPONG', firstName: 'JAMES', dateOfBirth: '1998-06-26'},
selfie: {image: 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'}
}
})
};
fetch('https://api.youverify.co/v2/api/identity/gh/passport', 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.youverify.co/v2/api/identity/gh/passport",
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([
'id' => 'G0000603',
'metadata' => [
'requestId' => '1209348756'
],
'isSubjectConsent' => true,
'validations' => [
'data' => [
'lastName' => 'AMPONG',
'firstName' => 'JAMES',
'dateOfBirth' => '1998-06-26'
],
'selfie' => [
'image' => 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.youverify.co/v2/api/identity/gh/passport"
payload := strings.NewReader("{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.youverify.co/v2/api/identity/gh/passport")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/gh/passport")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "success",
"data": {
"id": "62b500aef1d35a6cf8ba4db5",
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": false,
"selfieValidation": false,
"firstName": "JAMES",
"middleName": null,
"lastName": "AMPONG",
"fullName": "JAMES AMPONG",
"image": "data:image/jpg;base64,...",
"signature": "data:image/jpg;base64,...",
"placeOfbirth": "BANSO",
"nationality": "GHANAIAN",
"dateOfBirth": "1968-01-26",
"isConsent": true,
"idNumber": "G0000603",
"businessId": "6222a5ea3e7a41c29c030fac",
"type": "ghPassport",
"issuedAt": "ACCRA",
"issuedDate": "2010-03-31",
"expiredDate": "2015-03-30",
"gender": "male",
"requestedAt": "2022-06-24T00:09:18.337Z",
"requestedById": "6222a5ea3e7a41c29c030fad",
"country": "GH",
"createdAt": "2022-06-24T00:09:18.355Z",
"lastModifiedAt": "2022-06-24T00:09:18.355Z",
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "6222a5ea3e7a41c29c030fad"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "You have attempted to get a resource that does not exist.",
"name": "ResourceNotFoundError",
"data": {}
}{
"success": false,
"statusCode": 429,
"message": "Too many requests",
"name": "RateLimitError",
"data": {}
}{
"success": false,
"statusCode": 500,
"message": "Internal Server Error",
"name": "Error",
"data": {}
}Authorizations
Your Youverify API secret key. Never expose client-side.
Headers
API secret token
Body
application/json
Response
Success
⌘I
Verify International Passport
curl --request POST \
--url https://api.youverify.co/v2/api/identity/gh/passport \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "G0000603",
"metadata": {
"requestId": "1209348756"
},
"isSubjectConsent": true,
"validations": {
"data": {
"lastName": "AMPONG",
"firstName": "JAMES",
"dateOfBirth": "1998-06-26"
},
"selfie": {
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
}
}
'import requests
url = "https://api.youverify.co/v2/api/identity/gh/passport"
payload = {
"id": "G0000603",
"metadata": { "requestId": "1209348756" },
"isSubjectConsent": True,
"validations": {
"data": {
"lastName": "AMPONG",
"firstName": "JAMES",
"dateOfBirth": "1998-06-26"
},
"selfie": { "image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg" }
}
}
headers = {
"token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: 'G0000603',
metadata: {requestId: '1209348756'},
isSubjectConsent: true,
validations: {
data: {lastName: 'AMPONG', firstName: 'JAMES', dateOfBirth: '1998-06-26'},
selfie: {image: 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'}
}
})
};
fetch('https://api.youverify.co/v2/api/identity/gh/passport', 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.youverify.co/v2/api/identity/gh/passport",
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([
'id' => 'G0000603',
'metadata' => [
'requestId' => '1209348756'
],
'isSubjectConsent' => true,
'validations' => [
'data' => [
'lastName' => 'AMPONG',
'firstName' => 'JAMES',
'dateOfBirth' => '1998-06-26'
],
'selfie' => [
'image' => 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"token: <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.youverify.co/v2/api/identity/gh/passport"
payload := strings.NewReader("{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("token", "<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.youverify.co/v2/api/identity/gh/passport")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/gh/passport")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"G0000603\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"AMPONG\",\n \"firstName\": \"JAMES\",\n \"dateOfBirth\": \"1998-06-26\"\n },\n \"selfie\": {\n \"image\": \"https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "success",
"data": {
"id": "62b500aef1d35a6cf8ba4db5",
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": false,
"selfieValidation": false,
"firstName": "JAMES",
"middleName": null,
"lastName": "AMPONG",
"fullName": "JAMES AMPONG",
"image": "data:image/jpg;base64,...",
"signature": "data:image/jpg;base64,...",
"placeOfbirth": "BANSO",
"nationality": "GHANAIAN",
"dateOfBirth": "1968-01-26",
"isConsent": true,
"idNumber": "G0000603",
"businessId": "6222a5ea3e7a41c29c030fac",
"type": "ghPassport",
"issuedAt": "ACCRA",
"issuedDate": "2010-03-31",
"expiredDate": "2015-03-30",
"gender": "male",
"requestedAt": "2022-06-24T00:09:18.337Z",
"requestedById": "6222a5ea3e7a41c29c030fad",
"country": "GH",
"createdAt": "2022-06-24T00:09:18.355Z",
"lastModifiedAt": "2022-06-24T00:09:18.355Z",
"requestedBy": {
"firstName": "API",
"lastName": "User",
"middleName": "",
"id": "6222a5ea3e7a41c29c030fad"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 402,
"message": "Insufficient fund",
"name": "PaymentRequiredError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "You have attempted to get a resource that does not exist.",
"name": "ResourceNotFoundError",
"data": {}
}{
"success": false,
"statusCode": 429,
"message": "Too many requests",
"name": "RateLimitError",
"data": {}
}{
"success": false,
"statusCode": 500,
"message": "Internal Server Error",
"name": "Error",
"data": {}
}