API Reference
All Endpoints
Complete list of AgeOnce API endpoints
All API Endpoints
Complete list of available AgeOnce API endpoints.
Authentication and verification
GET /verify
Age verification page for the user.
GET https://app.ageonce.com/verify?client_id=...&redirect_uri=...&state=...| Parameter | Type | Description |
|---|---|---|
client_id | string | Your Client ID |
redirect_uri | string | URL for redirect |
state | string | CSRF protection |
POST /api/oauth/token
Exchange authorization code for age token.
POST https://app.ageonce.com/api/oauth/tokenRequest Body:
{
"client_id": "string",
"client_secret": "string",
"code": "string",
"redirect_uri": "string"
}Response:
{
"age_token": "string",
"token_type": "Bearer",
"expires_in": 600,
"transaction_id": "uuid"
}transaction_id — Audit ID for compliance; searchable in Dashboard Audit Logs.
POST /api/oauth/validate
Validate age token.
POST https://app.ageonce.com/api/oauth/validateRequest Body:
{
"token": "string"
}Response:
{
"valid": true,
"payload": {
"sub": "anonymous",
"age_verified": true,
"min_age": 18,
"verification_id": "uuid",
"verified_at": "2026-02-11T12:00:00Z",
"client_id": "string",
"iat": 1739275200,
"exp": 1739361600,
"iss": "ageonce"
}
}GET /api/oauth/jwks
JSON Web Key Set for local validation.
GET https://app.ageonce.com/api/oauth/jwksResponse:
{
"keys": [
{
"kty": "RSA",
"kid": "ageonce-public-key",
"use": "sig",
"alg": "RS256",
"n": "...",
"e": "AQAB"
}
]
}Statistics (Dashboard API)
These endpoints are only available to authenticated dashboard users.
GET /api/stats/usage
API usage statistics.
GET https://app.ageonce.com/api/stats/usage
Authorization: Bearer <session_token>Response:
{
"period": "month",
"total_verifications": 1250,
"successful": 1180,
"failed": 70,
"daily_breakdown": [
{ "date": "2026-02-01", "count": 45 },
{ "date": "2026-02-02", "count": 52 }
]
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Invalid parameters |
| 401 | Unauthorized |
| 403 | Access denied |
| 404 | Not found |
| 500 | Internal error |
Error Response Format
All errors are returned in standard format:
{
"error": "error_code",
"error_description": "Human readable description"
}Error codes
| Code | Description |
|---|---|
invalid_request | Missing or invalid parameters |
invalid_client | Invalid client_id or client_secret |
invalid_grant | Invalid or expired code |
unauthorized_client | Client not authorized |
access_denied | Access denied |
server_error | Internal server error |