---
title: "Check age with a proof that reveals only · Agent Wranglers"
url: https://agentwranglers.se/playbook/accounts/sign-up/age-proof
id: ACC-76
level: Recommended
applies: accounts
updated: 2026-10-22
build: a2a6bdfed830
tokens: 1069
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Check age with a proof that reveals only the age

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Sign-up](https://agentwranglers.se/playbook/accounts/sign-up.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: ACC-76
- Level: Recommended
- Chapter: [Sign-up](https://agentwranglers.se/playbook/accounts/sign-up.md)
- Rule: When a feature needs a minimum age, ask a wallet or an age verification app for a yes or no claim, such as "over 18". Never store an ID document scan or the birth date it shows.
- Check: A test runs the age check with a test credential. The user's row holds only the age result, the method and the time. A search of storage and logs finds no birth date, document number or document image from the check. A proof made for another request is refused.
- Applies when: The project has user accounts.
- How: An ID upload hands you a full name, a number and a photo to protect, to answer a question that needs one bit. The Commission's guidelines of 14 July 2025 on Article 28 of the Digital Services Act name the EU age verification blueprint as a reference standard. They also name the EU Digital Identity Wallet. The W3C Digital Credentials API, a working draft, lets a page ask the browser for such a proof. Its protocols are OpenID for Verifiable Presentations and ISO mdoc. Verify the proof's signature and that it answers your own request, then store only the result, the method and the time. Where the browser lacks the API, show the same request as a QR code for a phone wallet. Ask only for the age claim, as [Accept the EU Digital Identity Wallet where strong ID is needed](https://agentwranglers.se/playbook/accounts/bank-and-government-id/eu-identity-wallet.md) says. Which platforms must check age is set in [Protect minors on platforms they can reach](https://agentwranglers.se/playbook/compliance/online-platforms/protect-minors.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### JavaScript example

```js
export async function requestAgeProof(signedRequest) {
  if (!('DigitalCredential' in window)) return { fallback: 'qr-code' };
  const credential = await navigator.credentials.get({
    digital: { requests: [{ protocol: 'openid4vp-v1-signed', data: signedRequest }] },
  });
  return fetch('/age-proof', { method: 'POST', body: JSON.stringify(credential.data) });
}
```

### Python example

```python
def record_age_proof(user, presentation, request_id: str) -> None:
    claim = verifier.verify(presentation, expected_request=request_id)
    user.age_check = {"over_18": claim["age_over_18"], "method": "wallet", "checked_at": now()}
    user.save()
```

## Sources

- [European Commission guidelines on the protection of minors](https://digital-strategy.ec.europa.eu/en/library/commission-publishes-guidelines-protection-minors)
- [W3C Digital Credentials](https://www.w3.org/TR/digital-credentials/)

## Related rules

- ACC-75 [Get a parent's consent before relying on a child's consent](https://agentwranglers.se/playbook/accounts/sign-up/parental-consent.md) in Accounts and identity
- ACC-72 [Accept the EU Digital Identity Wallet where strong ID is needed](https://agentwranglers.se/playbook/accounts/bank-and-government-id/eu-identity-wallet.md) in Accounts and identity
- CMP-70 [Protect minors on platforms they can reach](https://agentwranglers.se/playbook/compliance/online-platforms/protect-minors.md) in Compliance and governance

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/accounts/sign-up/age-proof">Agent Wranglers accounts and identity playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Get a parent's consent before relying on a child's consent](https://agentwranglers.se/playbook/accounts/sign-up/parental-consent.md)
- [Sign-up](https://agentwranglers.se/playbook/accounts/sign-up.md)
