API Reference
Welcome
AgeKey provides a comprehensive API for privacy-preserving age verification. The API is built on OpenID Connect (OIDC) standards, making it familiar to developers who have worked with OAuth 2.0 or social login integrations.
Authentication
All API endpoints require proper client credentials and use standard OIDC authentication flows.
Client credentials
You'll need to obtain these from AgeKey:
client_id: Your app identifierclient_secret: Your app secret (keep this secure!)
Security best practices
Never expose your client_secret in front-end code. Always keep it secure on your server.
- Store credentials securely
- Implement proper state and nonce validation
- Validate all JWT tokens on your server
Base URLs
Use AgeKey Service:
https://api.agekey.org/v1/oidc/use
Create AgeKey Service:
https://api.agekey.org/v1/oidc/create
Verification Keys:
https://api.agekey.org/.well-known/jwks.json
Integration flows
AgeKey supports two main integration patterns:
OpenID Connect discovery
AgeKey supports OIDC discovery for easy integration with certified libraries.
Use AgeKey Discovery:
https://api.agekey.org/v1/oidc/use/.well-known/openid-configuration
Create AgeKey Discovery:
https://api.agekey.org/v1/oidc/create/.well-known/openid-configuration
Response formats
Age threshold results
When using the Use AgeKey flow, you'll receive age threshold results in this format:
{
"age_thresholds": {
"13": true,
"18": false,
"21": false
}
}
Error responses
Standard OIDC error responses and error redirect parameters are used.
Support
Get help
Contact the support team for integration assistance: support@AgeKey.org