Assuring Age With Age Verification
k-ID supports the ability to verify the age of a user by scanning government issued documents. This requires use of the /age-verification/perform-id-verification
API.
To perform ID Verification, an iframe needs to be displayed in a web page using the URL returned from the url
property of the response from /age-verification/perform-id-verification
. This will display the web-based ID Verification user experience. This means that the user experience can be hosted in a custom web page controlled by the game and displayed either in a Web View within the game, or in a separate browser window. When a user completes the verification step, the Webhook specified k-ID Publisher Portal will be invoked with an event with type AgeAssurance.Result
with the results of the verification. The schema of the event payload is documented here.
Using Age Threshold
ID Verification can check to see if a player is above a certain age, passed in the optional age
parameter. If the age
parameter is omitted, the age will be compared against the digital consent age of the jurisdiction, or the minimum age to play the game as configured in the k-ID Publisher Portal.
Receiving Results
The Age Assurance Result will be passed to any registered Webhook. When the result is received, it will indicate success or failure, but will also include minAge
, maxAge
and confidence
. For ID Verification, if the check passes, then minAge
and maxAge
will be the same, and confidence
will always be 1. The schema of the event payload is documented here.
Testing Age Estimation
Before trying to write code to call the k-ID API, you can try Facial Age Estimation yourself using your API key and the API Documentation.
First, follow the steps to make a simple k-ID API call.
Then, using the same browser window, make a call to /age-verification/perform-id-verification
. To do this, click on this API in the list.
Then click the Try it out
button, and then click the Execute
button.
The URL of the iframe that will be used in your app or a seperate browser window is contained in the url
parameter of the response. Copy this URL into your browser. It will be something like:
https://vx-fe.dcams.app/ebd42ca3-43e8-4522-b145-4845ad0802a8
You will then see the ID verification page: