API Reference
API Reference
Complete AgeOnce API documentation
API Reference
REST API documentation for integrating AgeOnce into your application.
Base URLs
The verification page and the API are different hosts.
https://app.ageonce.comBrowser redirect that starts verification. Pass client_id, redirect_uri, state, and age_required on this URL.
https://api.ageonce.comServer calls: token exchange, token validation, JWKS, and usage.
Authentication
AgeOnce uses OAuth 2.0 Authorization Code Flow. For API requests you need:
- Client ID — public identifier
- Client Secret — secret key (server-side only)
Never use Client Secret in frontend code!
Endpoints
OAuth Flow
Authorization and redirects
Token Exchange
POST /api/oauth/token
Token Validation
GET /api/verify/token/{access_token}
JWKS
GET /api/.well-known/jwks.json
Response format
All responses are returned in JSON format:
{
"access_token": "...",
"token_type": "Bearer",
"expires_in": 600
}Error codes
| HTTP code | Description |
|---|---|
| 200 | Success |
| 400 | Invalid request parameters |
| 401 | Invalid credentials |
| 403 | Access denied |
| 404 | Resource not found |
| 500 | Internal server error |
SDK and libraries
We currently offer REST API with examples for popular languages: