GET
Verify a Kenyan international passport and return the holderβs biographic details and photo.
/api/v1/ke/kyc/passportHeaders
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your appβs secret key, sent as-is β not Bearer. |
AppId | Yes | The App ID from your dashboard. |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id_number | string | Yes | The passport number. |
Response
Returns anentity object. The photo fields are base64 JPEG data (truncated below).
Errors
| Code | Meaning |
|---|---|
400 | Bad request β a required parameter is missing or malformed. |
401 | Unauthorized β check your key and AppId (no Bearer prefix). |
402 | Insufficient wallet balance. Fund your wallet. |
404 | No record found for the supplied identifier. |
424 | The upstream source was unavailable β retry shortly. |
429 | Too many requests β back off and retry. |
curl --request GET \
"https://api.dojah.io/api/v1/ke/kyc/passport?id_number=A00123456" \
-H "Authorization: {{secret_key}}" \
-H "AppId: {{app_id}}"
const params = new URLSearchParams({
"id_number": "A00123456",
});
const url = "https://api.dojah.io/api/v1/ke/kyc/passport?" + params;
const res = await fetch(url, {
headers: {
Authorization: process.env.DOJAH_SECRET_KEY,
AppId: process.env.DOJAH_APP_ID,
},
});
const data = await res.json();
import os, requests
res = requests.get(
"https://api.dojah.io/api/v1/ke/kyc/passport",
headers={
"Authorization": os.environ["DOJAH_SECRET_KEY"],
"AppId": os.environ["DOJAH_APP_ID"],
},
params={ "id_number": "A00123456" },
)
data = res.json()
{
"entity": {
"address": "BOX 12345-67890 NAIROBI KAREN KAREN LOCATION",
"citizenship": "",
"date_of_birth": "2000-09-20",
"date_of_birth_from_passport": "",
"date_of_issue": "2019-02-14",
"expiration_date": "2022-02-13",
"first_name": "John",
"gender": "M",
"last_name": "Musa",
"middle_name": "Doe",
"occupation": "",
"passport_number": "A00000000",
"phone_number": "Not Available",
"phone_number2": "Not Available",
"photo": "/9j/4AAQSkZJRgβ¦",
"photo_from_passport": "/9j/4AAQSkZJRgβ¦",
"place_of_birth": "NAIROBI"
}
}