Verify Age Threshold
Verify that the age of the subscriber associated with a phone number is equal to or greater than the specified age threshold value.
As it is possible that the person holding the contract and the end-user of the subscription may not be the same, the endpoint also admits a list of optional properties to be included in the request to improve the identification. The response may optionally include the identityMatchScore property with a value that indicates how certain it is that the information returned relates to the person that the API Client is requesting. To increase the reliability of the information returned, the API Provider may include in the response the verifiedStatus property, indicating whether the identity information in its possession has been verified against an identification document legally accepted as an age verification document (Note). Note: Depending on the country, credit-check or other mechanism can be used instead of official identification for Age Verification. For details, please contact API Provider.
If the API Client indicates request properties includeContentLock or includeParentalControl with value true and the API Provider implements this functionality, then the response will also include contentLock and parentalControl properties to indicate if the subscription has any kind of content filtering enabled. On the other hand, if the request properties are not included or the API Client specifies value false, then the response properties will not be returned. If the API Provider doesn’t implement this functionality, request properties will be ignored and response properties won’t be returned in any case.
Verify Age Threshold
import Camara from 'camara-sdk';
const client = new Camara({
bearerToken: process.env['CAMARA_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.knowyourcustomerageverification.verify({
ageThreshold: 18,
birthdate: '1978-08-22',
email: 'federicaSanchez.Arjona@example.com',
familyName: 'Sanchez Arjona',
familyNameAtBirth: 'YYYY',
givenName: 'Federica',
idDocument: '66666666q',
includeContentLock: true,
includeParentalControl: true,
middleNames: 'Sanchez',
name: 'Federica Sanchez Arjona',
phoneNumber: '+34629255833',
});
console.log(response.identityMatchScore);{
"ageCheck": "true",
"verifiedStatus": true,
"identityMatchScore": 90,
"contentLock": "false",
"parentalControl": "true"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "OUT_OF_RANGE",
"message": "Client specified an invalid range."
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 404,
"code": "IDENTIFIER_NOT_FOUND",
"message": "The phone number provided is not associated with a customer account"
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not applicable for the provided phone number"
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "No phone number has been provided"
}{
"status": 422,
"code": "UNNECESSARY_IDENTIFIER",
"message": "An explicit phone number has been provided when one is already associated with the access token"
}Returns Examples
{
"ageCheck": "true",
"verifiedStatus": true,
"identityMatchScore": 90,
"contentLock": "false",
"parentalControl": "true"
}{
"status": 400,
"code": "INVALID_ARGUMENT",
"message": "Client specified an invalid argument, request body or query param."
}{
"status": 400,
"code": "OUT_OF_RANGE",
"message": "Client specified an invalid range."
}{
"status": 401,
"code": "UNAUTHENTICATED",
"message": "Request not authenticated due to missing, invalid, or expired credentials. A new authentication is required."
}{
"status": 403,
"code": "PERMISSION_DENIED",
"message": "Client does not have sufficient permissions to perform this action."
}{
"status": 404,
"code": "IDENTIFIER_NOT_FOUND",
"message": "The phone number provided is not associated with a customer account"
}{
"status": 422,
"code": "SERVICE_NOT_APPLICABLE",
"message": "The service is not applicable for the provided phone number"
}{
"status": 422,
"code": "MISSING_IDENTIFIER",
"message": "No phone number has been provided"
}{
"status": 422,
"code": "UNNECESSARY_IDENTIFIER",
"message": "An explicit phone number has been provided when one is already associated with the access token"
}