KDPika Licensing Sign inStart free
API v1
Show all languages
Browse documentation

Choose a page in the navigation drawer.

KDPika Licensing · API v1 Intermediate

Handle errors and offline use

Stage 10: handle errors and offline use with a clear outcome, verification steps and one next action.

On this page
Updated 2026-10-20 UTCDownload Markdown
Complete Integration Guide

Before you start: Check the signed decision, or bring the same completed Sandbox setup.

Stage 10 of 14 · 15 min
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14

Already completed this? Skip to the next stage →

What you will do

Handle failures without trapping the customer or weakening access checks.

What you seeWhat to do
INVALID_LICENSECheck the full key, public App ID, Sandbox selection and matching customer email.
MAX_DEVICES_REACHEDDeactivate an old installation or inspect Devices. Do not make random identities.
SIGNATURE_INVALID / cached signature errorKeep access locked. Check the runtime, clock and SDK compatibility notes; do not disable verification.
NOT_ACTIVATEDRun activate in the same private state directory first.
NETWORK_ERROR / no connectionReconnect. A first activation needs internet; no cached response means no offline grant.
LICENSE_EXPIRED / LICENSE_REVOKED / LICENSE_SUSPENDEDExplain the state to the customer and provide support; never silently convert it to valid.

For normal launches, check can reuse a verified cache before its signed next_validation_at. After a network failure, any offline decision must still verify its signature, bindings, clock and offline_grace_until. Grace is based on signed server time, not “another N days after failure”.

  1. Keep first activation online.
  2. Use the same sample's check command to exercise the SDK's real cache policy.
  3. Treat missing, corrupted, stale or clock-rollback cache as a denial requiring reconnection.
  4. To move computers, run deactivate on the old installation while online, then activate on the new one.

Python

Release this installation:

bashbash
.venv/bin/python license-check.py deactivate

Expected output: Device released. This action does not grant access. Use activate on the replacement installation.

JavaScript / Node.js

Release this installation:

bashbash
node license-check.mjs deactivate

Expected output: Device released. This action does not grant access. Use activate on the replacement installation.

PHP

Release this installation:

bashbash
php license-check.php deactivate

Expected output: Device released. This action does not grant access. Use activate on the replacement installation.

C# / .NET

Release this installation:

bashbash
dotnet run --project Guide.csproj -- deactivate

Expected output: Device released. This action does not grant access. Use activate on the replacement installation.

cURL / other language

Use your REST project's deactivation operation with the stored activation token. Keep the installation identity stable and do not treat a release response as an access grant.

Do not erase local files as a substitute for server deactivation; that can abandon a device seat. Reset devices in the dashboard only after an authenticated support decision.

Expected result

Customers get a clear message: “We could not check your license. Reconnect or contact support.” They never see raw keys, tokens or stack traces.

If it does not work

An offline denial can be a correct security outcome. The current C# Unicode cache issue needs explicit testing; permission-protected files are not an OS vault.

Stage checklist

  • I tested a disconnected launch and an expired cache.
  • I tested a full device limit and a successful release.
  • I keep unknown or unverified states locked.

Next steps

Continue to Stage 11: Protect tokens and identity

You are here: Stage 10 of 14.

Was this page helpful?

Choose an answer

Do not include personal data, license keys or credentials. Retained for up to 30 days. This is not a support inbox.

Search documentation

Arrow keys to move, Enter to open, Escape to close. Search stays in your browser.

Cookie settings