Skip to main content

Try the API

Before trying to write code to call the k-ID API, you can test it yourself using your API key and the API Documentation. Get the API key from the Publisher Portal.

Publisher Dashboard

From API Documentation page, locate the Authorize button, and click it to enter the API key from your k-ID Product in the Developer Dashboard.

Dialog

Now open the /age-gate/check API section, and click the Try it out button

Try It Out

Now click the Execute button

Try It Out

In the section below you will see the successful result of the /age-gate/check call using

{
"jurisdiction": "US-CA",
"dateOfBirth": "2005-04-15"
}

as the post body.

Try It Out Result

You've now made a successful call to k-ID!

Try the Family Portal

To see the parent experience in the Family Portal, you need to create a Consent Challenge. To do that, make another call to /age-gate/check again using the Execute button, this time with the age of a child below the age of digital consent in the US jurisdiction.

Use

{
"jurisdiction": "US-CA",
"dateOfBirth": "2015-04-15"
}

which results in a response that looks something like this:

{
"challenge": {
"challengeId": "<guid>",
"childLiteAccessEnabled": false,
"oneTimePassword": "<one time password>",
"type": "CHALLENGE_PARENTAL_CONSENT",
"url": "https://family.k-id.com/authorize?otp=<one time password>"
},
"status": "CHALLENGE"
}

You can then navigate to the URL in the url field in a browser. You will be asked for an email address, and then you will receive an email with a link to the Family Portal where you can grant consent to play the game. Once you finish the consent flow in the browser, you can call the challenge/await API with the challengeId field above. You will get a response like the following:

{
"approverEmail": "email@example.com",
"sessionId": "<guid>",
"status": "PASS"
}

You have now successfully created a k-ID Session! You can see it by supplying the sessionId field as a parameter to /session/get.

{
"ageStatus": "DIGITAL_MINOR",
"dateOfBirth": "2015-04-15",
"etag": "<guid>",
"jurisdiction": "US",
"permissions": [
],
"sessionId": "<guid>",
"status": "ACTIVE"
}