Everything you need to know to integrate AgeWallet's API into your platform.
AgeWallet enables secure, anonymous age verification using user-generated tokens. Website owners can verify these tokens using our simple API.
Ask users to enter their AgeWallet token in your site's age gate or login page.
Send the token to the AgeWallet API endpoint using your API key and a POST request.
Our API will respond with age status, verification date, expiry, and method used.
If verified, grant the user access to your age-restricted content or services.
https://api.agewallet.io/verify
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"token": "user_token_here"
}
{
"over_18": true,
"over_21": true,
"verification_date": "2025-07-01 12:34:56",
"expiry": "2026-07-01 12:34:56",
"verification_method": "Vouched"
}
Note: Tokens are valid for one year. If the token is expired or invalid, an error will be returned.
<?php
$apiUrl = "https://api.agewallet.io/verify";
$apiKey = "YOUR_API_KEY";
$userToken = "user_token_here";
$data = [
"token" => $userToken
];
$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"Authorization: Bearer $apiKey",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$result = json_decode($response, true);
if ($result['over_18']) {
echo "User is over 18";
}
if ($result['over_21']) {
echo " and over 21";
}
} else {
echo "Verification failed: $response";
}
?>
fetch("https://api.agewallet.io/verify", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
token: "user_token_here"
})
})
.then(response => response.json())
.then(data => {
if (data.over_18) {
console.log("User is over 18");
}
if (data.over_21) {
console.log("User is over 21");
}
})
.catch(error => console.error("Verification error:", error));
Register your website and get your API key to begin verifying users today.
Register Your Site