Results and errors
The result shape every Family SDK call returns, the KidError codes, and what to show the parent.
Calls never throw. Each returns { ok: true, ... } or { ok: false, error }, and a hook's error is a KidError or null. A hook's error is for a failed load; a save, approval or removal reports its own failure in the result it returns, so check each one.
A KidError has:
| Field | Meaning |
|---|---|
code | One of the codes below (KidErrorCode). |
message | A fixed developer message for the code. |
status | The HTTP status, or 0 when no response arrived or the SDK refused the call itself. |
detail | Optional. What the code refers to, when the code alone is ambiguous. |
retryAfter | Optional, on rate_limited. The whole seconds to wait before trying again. |
Don't show message to parents
message is a fixed developer message, and anyone can read it in the browser console. Show the parent strings.errors[code] from useKidStrings() instead; the widgets already do.
Error codes
| Code | Message |
|---|---|
invalid_request | The request was invalid. |
unauthorized | Invalid publishable key or origin. |
invalid_token | Session not found or expired. |
invalid_jurisdiction | Unknown or invalid jurisdiction code. |
invalid_otp | Invalid or expired code. |
not_found | Child not found. |
rate_limited | Too many requests. Please wait and try again. |
unavailable | Something went wrong on our side. Please try again. |
child_limit_reached | Child limit reached. |
grant_access_disabled | This feature isn't enabled for this product. |
Error details
detail says what the code refers to when the code alone is ambiguous. These are the only values:
| Code | Detail |
|---|---|
invalid_token | link: an email link's own token is expired, used or invalid. setup: the setup's token is missing or expired. None for the parent's session. |
unauthorized | email: an email link sent to another parent, or for a child this parent doesn't manage. None for the key or origin. |
unavailable | feature_disabled: a capability the request needs is turned off, for example trusted-adult linking for an invite link. |
invalid_jurisdiction | The jurisdiction code that was sent. |
invalid_request | The permission name, document ID, preference name, product ID or kuid that was refused; irrevocable, revoke_applies or unlink_applies for the wrong kind of access removal; above_access_age, dependent_products or unsupported for a blocked revoke. |
Setup outcomes such as already_completed, invite_cancelled and expired are statuses on useKidChildSetup().status, not errors. See Setup status.
Key and origin problems
If a key isn't registered for the page's origin, or a live key for its host, parents see the generic sign-in error, and the SDK logs one console warning with the real reason. Check:
- The page's origin is listed under Domains for the key's mode in Compliance Studio, including the port for
localhost. - A live key's
baseUrlis your own CNAME'd subdomain, not ak-id.comhost. - A live key's
baseUrlis on the same registrable domain as the page. - A test key's
baseUrlishttps://family.test.k-id.com. - Your Content-Security-Policy allows the
baseUrlorigin inconnect-srcandframe-src, and the live-key bot check (see the Quickstart). - Your app calls
baseUrldirectly, not through a proxy of your own.
Customization
Theme the Family SDK widgets, translate or rewrite their copy, and use the Family Portal's avatars and icons.
2026 COPPA Rule Amendments
Configure your k-ID product for the COPPA Rule Amendments that take effect on April 22, 2026, including third-party disclosure links, per-feature consent for non-integral disclosures, and Data Notice updates.