age_verification
age_verification tells you whether the subscriber behind a
phone number is above an age threshold, based on the data the mobile
network holds for the line. You get a yes or no against the threshold,
never the subscriber's age or date of birth.
Use it where you need to know that a customer is an adult without asking them for an identity document, for example before giving access to age-restricted content or services.
Request
Send the number and age_verification in
commands. No other input is needed.
{
"number": "+447808226974",
"commands": ["age_verification"]
}
The operator already holds the subscriber's registered data, so the phone number is all it needs: you do not send a date of birth or any other detail. You do not choose the threshold either. It is set by the source that answers, and the response tells you which threshold the answer refers to. Always read it together with the result.
age_verification is not available in every country. Where
it is not available, see Billing.
Response
{
"status": 0,
"status_message": "Response from one supplier",
"age_verification": {
"verified": 1,
"threshold": 18
},
"version": "..."
}
| Field | Type | Meaning |
|---|---|---|
verified |
integer | The answer against threshold. See the table
below. |
threshold |
integer (years) | The age the answer refers to, currently 18. It can
change in the future, so always read it. -1 when
verified is -1: there is no evaluation
to refer to. |
verified values
| Value | Meaning |
|---|---|
1 | The subscriber is at or above the threshold. |
0 | The subscriber is below the threshold. |
-1 | No data: the operator holds no data for this subscriber, so the age can neither be confirmed nor denied. |
Treat -1 as "not verified", never as "under age". Only
0 says the subscriber is below the threshold.
Check threshold before acting on verified.
A 1 against a threshold lower than the one your rules
require is not enough.
When there is no age_verification block
If the source had no answer for the number, could not be reached, or
the check is not enabled for that operator, the response has no
age_verification block. The
status is 4, and the
status_message names age_verification among
the commands that returned no data. If the number's country is not
covered, the status is 2, or 4
when other commands were served.
Billing
A response with an age_verification block is charged,
including when verified is -1: that is an
answer from the operator. A response without the block is not
charged.