KDPikaLicensing
API v1
Show all languages
Browse documentation

Choose a page in the navigation drawer.

KDPika Licensing · API v1 Beginner

JavaScript: your first licensed export

Follow small dashboard examples and run a protected CSV export with JavaScript; understand native SDK or helper-based boundaries.

On this page
Updated 2026-10-26 UTCDownload Markdown

What you will try

You will make a real Sandbox license and export a real CSV with JavaScript. First follow the small dashboard fragments below, then run the prepared example. You don't need to write a full app to see the first result.

This example uses the official JavaScript SDK 2.0.1 directly. It verifies signed access and the csv_export feature before writing the file. The local Python launcher only collects your test configuration; it is not the licensing engine for this example.

1. Pick Sandbox

Open your dashboard. At the top choose Environment → Sandbox. All files in this first-project bundle deliberately use Sandbox; they cannot be switched to Live just by changing a browser selection.

Dashboard exampleExample data · not your account
Dashboard header → Environment

Work in test mode

Sandbox

Choose Sandbox before creating tutorial licenses.

1Environment
Sandbox

This changes the dashboard view. The application example also explicitly uses SANDBOX; it does not read your browser choice.

2. Create a product for the test

Open Products → New product. Use an example name such as Orbit Notes and the values below. Choose Desktop for a computer/CLI app; choose Web if this will be a trusted backend installation. Create it and copy your actual App ID from its card.

Dashboard exampleExample data · not your account
Products → New product

What are you licensing?

Sandbox
1Product name
Orbit Notes
Slug
orbit-notes
Description
A small app that exports a CSV file.
2Platform
Desktop
License prefix
ORBT
2–8 letters or numbers.
3Create product

Use a separate test product. The name and App ID shown here are examples, not real account data.

Dashboard exampleExample data · not your account
Products → Your product

Orbit Notes

Sandbox

Copy the actual App ID from your own product.

1App ID
app_YOUR_PUBLIC_ID

App ID is public. Never paste a management API key into a desktop app or browser.

3. Give the test customer CSV export

Open Plans & features → New plan. Choose your product. Enter a name/slug, Max devices = 2, Duration days = 30, Feature keys = csv_export. Leave shared seats blank and credits off for the first run. Choose Create plan.

Dashboard exampleExample data · not your account
Plans & features → New plan

Define access and entitlements

Sandbox
Product
Orbit Notes
1Plan name
Personal test
Slug
personal-test
Price
0
Reference metadata for this tutorial; creating a plan does not collect payment.
Currency
EUR
Billing type
One-time
Duration days
30
This teaching license lasts 30 days from its start.
2Max devices
2
3Feature keys
csv_export
Apps running at once
Leave blank
Blank means a normal license, not a floating one.
Usage credits (pay per use)Not selectedLeave off for your first feature-based export.
4Create plan

The 2-device allowance belongs to each customer license. It is different from the workspace device allowance.

Open Licenses → Create license. Choose that product/plan, enter an email you control and create the license. This also creates or reuses that customer, so a separate customer-creation step is not required. Copy the key privately.

Dashboard exampleExample data · not your account
Licenses → Create license

Grant product access

Sandbox

This license will be isolated in SANDBOX.

1Product and plan
Orbit Notes / Personal test
Customer name
Jane Example
2Customer email
jane@example.com
Use an email you control in your actual test.
Company
Leave blank (optional)
External customer ID
Leave blank (optional)
3Create license

The dashboard creates or reuses the customer for the entered email. You do not need a separate Add customer step.

4. Download and prepare the example

Download the first-project files. Extract them to a private local folder and open your terminal there. Install Node.js 22+; Node/Electron main, not browser code first. The launcher/setup helpers use Python 3.11–3.14 once; it is not an extra dependency of the official JavaScript SDK itself.

Create a private environment:

bashbash
python -m venv .venv

Activate it: Windows PowerShell uses .venv\Scripts\Activate.ps1; macOS/Linux uses source .venv/bin/activate. Then prepare only your language:

bashbash
python prepare.py javascript

Preparation installs/builds the selected example only. It does not create an account, activate a license or grant credits. Package downloads use the current SDK and reviewed local package checksums where applicable. If installation fails, read its runtime/package message; do not disable signature or checksum checks.

5. Run and answer three simple questions

bashbash
python launch.py javascript
  1. Paste your real public App ID from Products.
  2. Enter the Sandbox license privately when asked. It is not written into source files or command arguments.
  3. Enter its matching customer email.

Expected result: the terminal prints Saved: and a path to export.csv. Open that file; it contains “My first licensed export”. A refusal leaves the protected export locked. Keep tokens/state in the private per-language folder under your user profile, not in a public web folder.

On later runs leave the key empty to reuse saved activation. Each language example has its own installation state and therefore uses a separate device allowance. Before switching languages on a small plan, release the old example machine:

bashbash
python launch.py javascript --release

The helper runs the fixed local command node app.mjs from the javascript folder. The example is command-line code, not a packaged desktop GUI or public web login system. For your own UI, call the same SDK guard immediately before protected work.

6. Add one advanced rule at a time

The dashboard settings are the same in every language. Use the full visual feature walkthrough to see each exact section and button. The language-specific code names are below; they are not additional dashboard fields.

You wantDashboard choiceWhat your application must do
A computer allowanceMax devices on the software plan / Devices overrideCheck the server's signed result; do not invent a local device counter
Some offline useProduct → Validate every / Offline graceUse SDK verified cache within signed deadlines; no instant offline revocation
Strict/flexible matchingProduct → Device matchingSDK collects hashes automatically; never generate a random fallback
Shared running seatsShared seats → Apps running at once and timingKeep a signed lease alive and release it when the app closes
One credit per jobUsage credits; then grant units on the issued licenseConfirm a signed consume with one stable key before the job; persist/reuse the job key on uncertainty
One customer's exceptionLicense → Limits & overridesRe-check; use effective signed settings instead of customer-specific hard-coded rules
Customer self-serviceCustomer portal → Copy linkOpen the real publisher sign-in URL; do not put a license key/token in it
Your brandCustomer portal brandingSave name/logo/color/support email; hide platform branding only if included
Change historyAudit logsReview eligible recorded actions; keep application logs free of secrets
OperationSDK calls / checks
Standard guardawait client.check(); then result.valid, result.signatureValid, result.feature("csv_export")
Shared seatsawait client.checkout(), heartbeat(), checkin(), close(); stop work at signed lease expiry
Creditsawait client.consume(1, "your-stable-job-key"); await client.getBalance()

The first native example deliberately refuses credit plans because it does not include a durable charge/job journal. It must never offer a free metered export. Study the complete credit job example for retry/work deduplication, then implement the same job rules around your own SDK calls. The table names methods; it is not a complete credit implementation.

7. Check your work

  • Correct key, matching email, same product and Sandbox: one real CSV appears.
  • No csv_export: access is refused. To change existing grants, edit the plan and choose existing-license scope, then validate online.
  • Device allowance reached: release another example machine before a genuinely new activation. Do not delete state folders or copy activation tokens to simulate more computers.
  • Shared seats full: wait for a seat to be released. A one-shot example releases its seat at exit; use separate long-running apps to test simultaneous usage.
  • A credit plan: the first export route refuses unpaid work. Credits are online-only; a normal feature check does not consume units.

Before you put this on the internet or ship an installer

Keep secrets and private state off public web paths and out of source control. A desktop license check is not your SaaS user login; authenticate and authorize each real web customer on your backend. A browser cannot collect a supported native hardware fingerprint. Real OS/framework, packaging, process and credential-vault review is still required. Compilation or a helper smoke test does not certify a complete app.

All visual learning paths · Shared feature walkthrough · Current SDK capabilities.

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