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

Choose a page in the navigation drawer.

KDPika Licensing · API v1 Beginner

Authentication

Choose the correct public App ID, activation token or scoped developer API key and keep management secrets on trusted servers.

On this page
Updated 2026-10-17 UTCDownload Markdown

Use a public App ID for activation, an activation token for an installation, and a developer API key only for server-side management.

What you will learn

  • Compare the three credential types.
  • Create, scope, rotate and revoke a management key.
  • Respond to a leaked key without exposing more customer data.

Prerequisites

Credential comparison

CredentialWho uses it / where it livesShippable?Scope and lifetimeRotation
Public App ID, app_App configuration; Products cardYes; not a secretIdentifies a product shared across environments; activation also needs a key and environmentNo secret rotation is needed; no public-ID rotation workflow is offered
Activation token, act_One activated app installation; protected local storageNever bundle a token for all customersLicense/device binding; status-based acceptance, no independent elapsed-time TTL check; license and signed-cache deadlines still applyRe-activate the installation; its prior active token is revoked
Developer API key, lmp_Your trusted backend secret configurationNoOrganization, product, environment and scopes; configured expiry/revocation applyDashboard rotation immediately revokes the old key; no overlap window

Headers and environment

Activation sends X-App-ID and X-Environment: SANDBOX or LIVE. Its body contains the license key and stable device_id. An optional email must match the license's customer.

Validation sends Authorization: Bearer followed by the activation token and X-Installation-ID containing the same persisted identity. Always send the installation header; the API currently accepts its omission, but then signs a null installation hash that conforming SDK checks do not accept.

Management sends Authorization: Bearer followed by the developer API key. That key, not an X-Environment override, determines the environment. Do not substitute an activation token into a management operation.

Registered scopes

ScopeRegistered operations
licenses:readRead a license by ID
licenses:writeCreate, revoke, suspend, restore and renew licenses
devices:writeReset devices for a license

An arbitrary scope string does not create a new API permission. A reset-devices key does not gain license-creation rights.

Create a key

  1. Open API keys in the dashboard.
  2. Choose the product and Sandbox or Live environment.
  3. Select only the scopes your server needs.
  4. Set a descriptive key name and any supported expiry.
  5. Create the key and copy the full secret once into your server's secret configuration.

Expected result: the listing contains a display prefix, not a recoverable complete secret. Live issuance needs eligible paid access.

For client-only quickstart activation, do not create a management key at all.

Rotate or revoke

  1. Identify the intended key by its name, product and environment.
  2. Use Rotate when replacing it, or Revoke when stopping all future use.
  3. For rotation, copy the new secret and deploy it to the trusted backend.
  4. Confirm a management request works with the replacement.
  5. Review API and audit logs for unexpected failures.

Expected result: old-key requests fail. Rotation has no overlap; coordinate the backend update rather than assuming a zero-interruption grace window.

Correct use by application

App typeCorrectIncorrect
DesktopPublic App ID and customer key activate; local token validatesEmbed an lmp_ key in the executable
SaaSAuthenticate your user and gate server actions using valid license stateTrust a browser's paid=true claim
CLIPersist identity and token in protected per-user statePrint a token into shell logs
Plugin or extensionCustomer host uses activation credentials; your server manages licensesTreat the customer's server or extension bundle as your secret vault

If a key leaks

  1. Revoke the compromised key, or rotate it and securely deploy the replacement.
  2. Review API and audit history for that key's product/environment and request IDs.
  3. Identify affected licenses and investigate actual changes.
  4. Suspend or revoke only licenses requiring that response under your policy.
  5. Remove the exposed value from your release process and notify affected parties when appropriate.

Expected result: the old credential no longer works and the investigation is recorded. Deleting a public post alone does not invalidate a leaked key.

Expected result

You can explain which secret is on the client, which is on the server, and how the selected environment is enforced.

Common mistakes

  • Treating the public App ID as a management secret.
  • Rotating a developer key without updating its consumer.
  • Omitting X-Installation-ID and accepting a signed response for no bound installation.
  • Assuming a restored license revives its revoked activation tokens.

Security notes

Developer and activation tokens are hashed in their corresponding database records. Webhook secrets are a different credential, with an encrypted copy used for delivery. Do not put any of these secrets into documentation feedback.

A credential's successful authentication is not a promise that every resource-creation operation is allowed; endpoint scopes, current plan gates and license rules still apply.

Troubleshooting

SymptomCauseFix
INVALID_API_KEYMissing, expired, revoked or ineligible developer credentialCheck the server's current key and environment
INSUFFICIENT_SCOPEKey lacks the operation's registered scopeIssue an appropriately scoped key; do not broaden a shipped client
INVALID_TOKENInstallation token is missing, replaced or invalidatedRe-activate only an eligible license
DEVICE_MISMATCHInstallation header differs from the token's bindingLoad the original persisted ID instead of generating one per request

Next steps

Run the quickstart, then read the activation flow.

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