KYC - General
Retrieve an Identity
Allows the user to retrieve an already verified identity by its identity ID.
GET
/
v2
/
api
/
identity
/
{identityId}
Retrieve an Identity
curl --request GET \
--url https://api.youverify.co/v2/api/identity/{identityId} \
--header 'token: <api-key>'import requests
url = "https://api.youverify.co/v2/api/identity/{identityId}"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.youverify.co/v2/api/identity/{identityId}', 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/{identityId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.youverify.co/v2/api/identity/{identityId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.youverify.co/v2/api/identity/{identityId}")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/{identityId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Identity retrieved successfully!",
"data": {
"validations": {
"data": {
"lastName": {
"validated": true,
"value": "Ehichioya"
},
"dateOfBirth": {
"validated": true,
"value": "2000-01-01"
},
"firstName": {
"validated": true,
"value": "Famous"
}
},
"selfie": {
"selfieVerification": {
"confidenceLevel": 94,
"match": true,
"image": "https://cdn.youverify.co/262731241627-dvahka4o4vDxfvQUJgZFo.jpg"
}
},
"validationMessages": ""
},
"parentId": "612ce40ab8919f39faf7ae49",
"status": "found",
"dataValidation": true,
"selfieValidation": true,
"firstName": "FAMOUS",
"middleName": null,
"lastName": "EHICHIOYA",
"expiredDate": "2026-04-04T00:00:00.000Z",
"issuedDate": "2021-05-26T00:00:00.000Z",
"stateOfIssuance": "LAGOS",
"notifyWhenIdExpire": false,
"image": "data:image/jpg;base64,...",
"mobile": null,
"email": null,
"dateOfBirth": "2000-01-01",
"isConsent": true,
"idNumber": "SMK86220xxxx",
"businessId": "619b683ecb55a2a588f4b83c",
"type": "ndl",
"gender": "male",
"requestedAt": "2021-12-13T13:57:38.542Z",
"country": "NG",
"createdAt": "2021-12-13T13:57:38.722Z",
"lastModifiedAt": "2021-12-13T13:57:38.722Z",
"id": "61b7514b193d2e7807f42152",
"requestedBy": {
"firstName": "Famous",
"lastName": "Ehichioya",
"middleName": "",
"id": "619b683ecb55a2a588f4b83d"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "Not found",
"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": {}
}⌘I
Retrieve an Identity
curl --request GET \
--url https://api.youverify.co/v2/api/identity/{identityId} \
--header 'token: <api-key>'import requests
url = "https://api.youverify.co/v2/api/identity/{identityId}"
headers = {"token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {token: '<api-key>'}};
fetch('https://api.youverify.co/v2/api/identity/{identityId}', 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/{identityId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.youverify.co/v2/api/identity/{identityId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.youverify.co/v2/api/identity/{identityId}")
.header("token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.youverify.co/v2/api/identity/{identityId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"statusCode": 200,
"message": "Identity retrieved successfully!",
"data": {
"validations": {
"data": {
"lastName": {
"validated": true,
"value": "Ehichioya"
},
"dateOfBirth": {
"validated": true,
"value": "2000-01-01"
},
"firstName": {
"validated": true,
"value": "Famous"
}
},
"selfie": {
"selfieVerification": {
"confidenceLevel": 94,
"match": true,
"image": "https://cdn.youverify.co/262731241627-dvahka4o4vDxfvQUJgZFo.jpg"
}
},
"validationMessages": ""
},
"parentId": "612ce40ab8919f39faf7ae49",
"status": "found",
"dataValidation": true,
"selfieValidation": true,
"firstName": "FAMOUS",
"middleName": null,
"lastName": "EHICHIOYA",
"expiredDate": "2026-04-04T00:00:00.000Z",
"issuedDate": "2021-05-26T00:00:00.000Z",
"stateOfIssuance": "LAGOS",
"notifyWhenIdExpire": false,
"image": "data:image/jpg;base64,...",
"mobile": null,
"email": null,
"dateOfBirth": "2000-01-01",
"isConsent": true,
"idNumber": "SMK86220xxxx",
"businessId": "619b683ecb55a2a588f4b83c",
"type": "ndl",
"gender": "male",
"requestedAt": "2021-12-13T13:57:38.542Z",
"country": "NG",
"createdAt": "2021-12-13T13:57:38.722Z",
"lastModifiedAt": "2021-12-13T13:57:38.722Z",
"id": "61b7514b193d2e7807f42152",
"requestedBy": {
"firstName": "Famous",
"lastName": "Ehichioya",
"middleName": "",
"id": "619b683ecb55a2a588f4b83d"
}
},
"links": []
}{
"success": false,
"statusCode": 401,
"message": "Permission denied",
"name": "UnauthorizedError",
"data": {}
}{
"success": false,
"statusCode": 404,
"message": "Not found",
"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": {}
}