KYC - Ghana
Verify Ghana Voters Card (GVC)
Verifies Ghana Voters Card (GVC) numbers, including facial matching and data validation against government database records.
POST
/
v2
/
api
/
identity
/
gh
/
voter
Verify Ghana Voters Card (GVC)
curl --request POST \
--url https://api.youverify.co/v2/api/identity/gh/voter \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "9001330456",
"metadata": {
"requestId": "1209348756"
},
"type": "old_voter_card",
"isSubjectConsent": true,
"validations": {
"data": {
"lastName": "HEHETA",
"firstName": "DAVID",
"dateOfBirth": "1998-06-26"
},
"selfie": {
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
}
}
'import requests
url = "https://api.youverify.co/v2/api/identity/gh/voter"
payload = {
"id": "9001330456",
"metadata": { "requestId": "1209348756" },
"type": "old_voter_card",
"isSubjectConsent": True,
"validations": {
"data": {
"lastName": "HEHETA",
"firstName": "DAVID",
"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: '9001330456',
metadata: {requestId: '1209348756'},
type: 'old_voter_card',
isSubjectConsent: true,
validations: {
data: {lastName: 'HEHETA', firstName: 'DAVID', dateOfBirth: '1998-06-26'},
selfie: {image: 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'}
}
})
};
fetch('https://api.youverify.co/v2/api/identity/gh/voter', 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/voter",
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' => '9001330456',
'metadata' => [
'requestId' => '1209348756'
],
'type' => 'old_voter_card',
'isSubjectConsent' => true,
'validations' => [
'data' => [
'lastName' => 'HEHETA',
'firstName' => 'DAVID',
'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/voter"
payload := strings.NewReader("{\n \"id\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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/voter")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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/voter")
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\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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": "62a91e09aa9264cb103e37d9",
"validations": {
"data": {
"lastName": {
"validated": true,
"value": "HEHETA"
},
"firstName": {
"validated": true,
"value": "DAVID"
}
},
"selfie": {
"selfieVerification": {
"confidenceLevel": 0,
"threshold": 80,
"match": false,
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
},
"validationMessages": "Provided image does not match ID image"
},
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": true,
"selfieValidation": true,
"firstName": "DAVID",
"middleName": null,
"lastName": "HEHETA",
"fullName": "DAVID HEHETA",
"image": "data:image/jpg;base64,...",
"pollingStation": "G161602",
"nationality": "GHANAIAN",
"dateOfBirth": null,
"isConsent": true,
"idNumber": "9001330456",
"businessId": "61d880f1e8e15aaf24558f1a",
"type": "ghVoter",
"age": 18,
"voterType": "old_voter_card",
"gender": "m",
"requestedAt": "2022-06-14T23:47:25.819Z",
"requestedById": "61d880f2e8e15aaf24558f9b",
"country": "GH",
"createdAt": "2022-06-14T23:47:25.991Z",
"lastModifiedAt": "2022-06-14T23:47:25.991Z",
"requestedBy": {
"firstName": "Famous",
"lastName": "Ehichioya",
"middleName": "Prior",
"id": "61d880f2e8e15aaf24558f9b"
}
},
"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
Candidate's GVC number
Must be true; indicates subject consent
Voter card type
Available options:
old_voter_card, new_voter_card Validation object containing data and selfie sub-objects
Show child attributes
Show child attributes
Custom metadata object, returned as-is
Response
Success
⌘I
Verify Ghana Voters Card (GVC)
curl --request POST \
--url https://api.youverify.co/v2/api/identity/gh/voter \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "9001330456",
"metadata": {
"requestId": "1209348756"
},
"type": "old_voter_card",
"isSubjectConsent": true,
"validations": {
"data": {
"lastName": "HEHETA",
"firstName": "DAVID",
"dateOfBirth": "1998-06-26"
},
"selfie": {
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
}
}
'import requests
url = "https://api.youverify.co/v2/api/identity/gh/voter"
payload = {
"id": "9001330456",
"metadata": { "requestId": "1209348756" },
"type": "old_voter_card",
"isSubjectConsent": True,
"validations": {
"data": {
"lastName": "HEHETA",
"firstName": "DAVID",
"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: '9001330456',
metadata: {requestId: '1209348756'},
type: 'old_voter_card',
isSubjectConsent: true,
validations: {
data: {lastName: 'HEHETA', firstName: 'DAVID', dateOfBirth: '1998-06-26'},
selfie: {image: 'https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg'}
}
})
};
fetch('https://api.youverify.co/v2/api/identity/gh/voter', 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/voter",
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' => '9001330456',
'metadata' => [
'requestId' => '1209348756'
],
'type' => 'old_voter_card',
'isSubjectConsent' => true,
'validations' => [
'data' => [
'lastName' => 'HEHETA',
'firstName' => 'DAVID',
'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/voter"
payload := strings.NewReader("{\n \"id\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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/voter")
.header("token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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/voter")
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\": \"9001330456\",\n \"metadata\": {\n \"requestId\": \"1209348756\"\n },\n \"type\": \"old_voter_card\",\n \"isSubjectConsent\": true,\n \"validations\": {\n \"data\": {\n \"lastName\": \"HEHETA\",\n \"firstName\": \"DAVID\",\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": "62a91e09aa9264cb103e37d9",
"validations": {
"data": {
"lastName": {
"validated": true,
"value": "HEHETA"
},
"firstName": {
"validated": true,
"value": "DAVID"
}
},
"selfie": {
"selfieVerification": {
"confidenceLevel": 0,
"threshold": 80,
"match": false,
"image": "https://cdn.youverify.co/1655261851961-za9BbHiHvWwROm19hRlv7.jpg"
}
},
"validationMessages": "Provided image does not match ID image"
},
"parentId": null,
"status": "found",
"reason": null,
"dataValidation": true,
"selfieValidation": true,
"firstName": "DAVID",
"middleName": null,
"lastName": "HEHETA",
"fullName": "DAVID HEHETA",
"image": "data:image/jpg;base64,...",
"pollingStation": "G161602",
"nationality": "GHANAIAN",
"dateOfBirth": null,
"isConsent": true,
"idNumber": "9001330456",
"businessId": "61d880f1e8e15aaf24558f1a",
"type": "ghVoter",
"age": 18,
"voterType": "old_voter_card",
"gender": "m",
"requestedAt": "2022-06-14T23:47:25.819Z",
"requestedById": "61d880f2e8e15aaf24558f9b",
"country": "GH",
"createdAt": "2022-06-14T23:47:25.991Z",
"lastModifiedAt": "2022-06-14T23:47:25.991Z",
"requestedBy": {
"firstName": "Famous",
"lastName": "Ehichioya",
"middleName": "Prior",
"id": "61d880f2e8e15aaf24558f9b"
}
},
"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": {}
}