Developer Documentation

Privacy-first age verification that collects minimal data and returns only yes/no

Getting Started

AgeGate provides a simple and secure way to verify user ages without collecting personal data. Our API is designed to be easy to integrate while maintaining complete user privacy.

Quick Start

  1. Contact us to become a partner and get your API key
  2. Add your domain to the whitelist
  3. Implement the simple 3-step integration
  4. Go live with real age verification

Basic Implementation (PHP)

// 1. Start verification request
$partner_id = 'your_partner_id';
$api_key = 'your_api_key';
$timestamp = time();
$signature = hash_hmac('sha256', $partner_id . '|' . $timestamp, $api_key);

$response = curl_exec(curl_init_with([
    CURLOPT_URL => 'https://agegate.app/verify/server.php',
    CURLOPT_POSTFIELDS => http_build_query([
        'partner_id' => $partner_id,
        'timestamp' => $timestamp,
        'signature' => $signature,
        'return_url' => 'https://yourapp.com/callback'
    ])
]));

// 2. Redirect user to AgeGate
$result = json_decode($response, true);
header('Location: ' . $result['redirect_url']);

// 3. Handle callback (no user data received!)
if (isset($_GET['verified'])) {
    $expected_sig = hash_hmac('sha256', $partner_id . '|' . $_GET['verified'], $api_key);
    if (hash_equals($expected_sig, $_GET['signature'])) {
        // User verified as 18+ - that's all we know!
        grant_access();
    }
}

Authentication

All API requests use HMAC-SHA256 signatures for authentication. This ensures request integrity and prevents tampering.

HMAC Signature Authentication

// Create signature for request
$partner_id = 'your_partner_id';
$timestamp = time();
$data = $partner_id . '|' . $timestamp;
$signature = hash_hmac('sha256', $data, $your_api_key);

// Send with request
$postfields = [
    'partner_id' => $partner_id,
    'timestamp' => $timestamp,
    'signature' => $signature,
    'return_url' => $your_return_url
];

Security Note

Never expose your API key in client-side code. Always make API requests from your backend server.

API Reference

AgeGate's privacy-first API collects minimal data - only what's needed for verification. We don't store personal information and only return a simple yes/no answer.

Request Verification Session

POST /verify/server.php

Starts an age verification session with minimal data collection.

Request (Form Data)

partner_id=your_partner_id
timestamp=1640995200
signature=hmac_sha256_signature
return_url=https://yourapp.com/callback

Privacy Note

No user data is sent to AgeGate. Only your partner ID, timestamp, and return URL. The signature ensures request authenticity.

Response

{
  "success": true,
  "redirect_url": "https://agegate.app/verify/start.php?token=abc123"
}

Verification Callback

GET your_return_url?verified=timestamp&signature=hmac

AgeGate redirects users back to your site with a simple verified/not verified result.

Callback Parameters

verified=1640995800        // Timestamp if verified
signature=abc123def456...   // HMAC signature for verification

Minimal Data Response

AgeGate only returns a timestamp (indicating verification occurred) and a signature. No age data, no personal information, no biometrics - just yes/no verification.

Verification Check

// Verify the callback signature
$data = $partner_id . '|' . $_GET['verified'];
$expected_signature = hash_hmac('sha256', $data, $api_key);

if (hash_equals($expected_signature, $_GET['signature'])) {
    // User is verified as 18+
    $is_verified = true;
}

Privacy & Data Minimization

AgeGate is designed from the ground up to minimize data collection and protect user privacy. Here's exactly what we collect, process, and return.

What We DON'T Collect

  • • No names or personal identifiers
  • • No addresses or location data
  • • No exact ages or birth dates
  • • No biometric data storage
  • • No browsing history
  • • No device fingerprinting
  • • No tracking cookies

What We DO Return

  • • Simple yes/no verification result
  • • Timestamp of verification
  • • HMAC signature for authenticity
  • • Nothing else

Real-time Processing Only

All verification happens in real-time during the user's session. No data is stored on our servers after verification is complete. Images are processed immediately and discarded - never saved to disk or database.

Best Practices

Security

  • Always use HTTPS for API requests and webhooks
  • Store API keys securely and rotate them regularly
  • Verify webhook signatures before processing

User Experience

  • Clearly explain why age verification is required
  • Provide clear instructions during verification
  • Handle errors gracefully with helpful messages

Ready to Get Started?

Experience the future of age verification today