Testing
Testing your k-ID integration is essential to ensure it works correctly before going live. This guide covers testing strategies and tools available in the k-ID platform.
Test mode and live mode
k-ID provides two environments for testing and production:
Test mode

Test mode allows developers to test integrations without affecting real data or production systems. When using a Test Mode API key, requests are sent to the test environment at https://game-api.test.k-id.com. This environment is designed to simulate the live system but operates with mock data.
Test-mode challenge URLs (such as the URLs returned by /age-gate/check, /session/upgrade, and /challenge/send-email) intentionally expire after 7 minutes instead of the live-mode 2 weeks. The short lifespan lets you exercise expired-URL handling without waiting. For details, see Challenge URL and email link expiration. AgeKit+ age verification URLs are always valid for 2 weeks regardless of mode (see Verification URL validity).
Live mode

Live mode is used for production. When using a Live Mode API key, requests are sent to the production environment at https://game-api.k-id.com. This environment processes real data and interacts with live systems.
Note: Always verify that you are using the correct API key and endpoint for the intended mode to avoid unintended impacts on production data.
Mock and real providers
When a product is running in Test Mode, the Family Connect widget shows a TEST MODE toolbar with a switch between a built-in simulator (Mock Providers) and each method's real sandbox (Real Providers). For the full behavior, including toolbar controls, simulator screens, supported presets per method, and how mock submissions are processed, see Verification methods: mock and real providers.
Testing with the interactive API reference
Before writing code to call the k-ID API, you can test endpoints directly using the interactive API reference built into the documentation.
Set up API testing
-
Navigate to any endpoint page in the API Reference, for example the
/age-gate/checkendpoint. -
Check the environment: The Server URL row at the top of the request panel starts on test mode (
https://game-api.test.k-id.com/api/v1), which is what you want here. The edit icon at the right of the row changes it. -
Authenticate your request: Sign in with the Sign in button in the navbar and pick your product from the Use a product's test key dropdown in the Authorization section — its test key is filled in for you. Otherwise, paste a test key into the
Authorization (Header)field yourself; you can generate one on the Developer Settings page of your product in Compliance Studio. -
Configure the request body: Open the Body section and edit the fields as needed. For testing, use:
{ "jurisdiction": "US-CA", "dateOfBirth": "2005-04-15" }Open JSON Editor lets you paste that in directly rather than filling the form.
-
Send the request: Click Send to complete the API call.
-
View the response: The response appears at the top of the request panel, with its status code and body.
You've now made a successful call to k-ID! For more detailed information about using the interactive reference, see the Interactive reference guide.
Testing trusted adult consent
To see the parent experience in Family Connect, you need to create a Consent Challenge. To do that, make another call to /age-gate/check using the interactive reference, 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"
}This results in a response that looks 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 are asked for an email address, and then receive an email with a link to Family Connect where you can grant consent to play the game. Once you finish the consent flow in the browser, you can call the challenge/get-status API with the challengeId field previously provided. The response is:
{
"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>",
"kuid": "<guid>",
"status": "ACTIVE"
}