Integration Examples

One REST API call. Any language. Any platform.

licentio.ini

Download this file from your dashboard and place it next to your executable.

[Licentio]
ProgramID=your-program-uuid
ClientID=your-client-uuid
APIKey=your-api-key

Your app also writes a licentio.cache file next to the executable at runtime — do not ship it, it is created on the first successful validation.

Offline grace

Set an Offline grace (days) on the license in your dashboard. On every successful validation the API returns a signed window the client caches, so a user can keep working when their internet — or your server — is temporarily unreachable.

Each client below follows the same algorithm when a request can't reach the server:

  1. Read the cached IssuedAt, ValidUntil (Unix epoch seconds, UTC) and Token.
  2. Recompute HMAC-SHA256(APIKey, "ClientID|IssuedAt|ValidUntil") and check it equals the cached Token — proves the window wasn't edited.
  3. Block if now < IssuedAt (the clock was set back) or now > ValidUntil (grace expired). Otherwise, run.

Update notice

When you publish a release of the program in Pensum, every validation also returns latest_version and latest_released_at — plus release_notes_url if the program's public changelog is published.

Send the version your app is running as "app_version": "2.3.1" and the response adds update_available (true/false; versions compare as numbers, so 2.10 is newer than 2.9). Show a notice with the notes link when it is true. Apps that ignore these fields keep working exactly as before — they are not part of the offline signature.

Error reports

Your app can send its crashes to POST https://licentio.dev/errors with the same program_id, client_id and api_key as the license check. Licentio cleans up each stack (line numbers, paths and values go) and groups identical crashes, whichever customer sent them. Each group becomes a bug card on the board that has Error reports turned on (board → Automation); the customers who hit it are added to the card, so they show up in the release plan. If the card is done and the crash comes back in the fixed version, the card reopens.

Fields: app_version, platform (windev, flutter, dotnet, python), os, error_type, message, stack, occurred_at, and optionally context (a small JSON object) and fingerprint (to group reports yourself). At most 64 KB per report and 120 reports per customer per hour.

Every snippet below saves the report to disk first and then sends whatever is pending, so crashes that happen offline arrive on the next start. Send only technical data — no personal data of your users. The license check's app_version also tells you which version each customer runs (Pensum → Errors & versions).

cURL

The simplest way to test the API from any terminal.

curl -X POST https://licentio.dev/validate \
  -H "Content-Type: application/json" \
  -d '{
    "program_id": "your-program-uuid",
    "client_id":  "your-client-uuid",
    "api_key":    "your-api-key",
    "app_version": "2.3.1"
  }'

Response

When the license has an offline grace, a valid response also carries the signed window the client caches (issued_at/valid_until are Unix epoch seconds).

{
  "valid": true,
  "message": "License valid",
  "license_type": "EXPIRY_DATE",
  "days_remaining": 17,
  "warning": true,
  "warning_message": "License expires in 17 days",

  "offline_days": 7,
  "issued_at": 1785484800,
  "valid_until": 1786089600,
  "offline_token": "3cce096c1eb9...b90ea1",
  "offline_message": "Could not reach the license server.",

  "latest_version": "2.4.0",
  "latest_released_at": "2026-11-24T16:30:00Z",
  "release_notes_url": "https://licentio.dev/changelog/Xk3…",
  "update_available": true
}

Error report

The same call every snippet makes when the app crashes.

curl -X POST https://licentio.dev/errors \
  -H "Content-Type: application/json" \
  -d '{
    "program_id":  "your-program-uuid",
    "client_id":   "your-client-uuid",
    "api_key":     "your-api-key",
    "app_version": "2.3.1",
    "platform":    "python",
    "error_type":  "KeyError",
    "message":     "'date'",
    "stack":       "Traceback (most recent call last):\n  File \"export.py\", line 88, in export\nKeyError: '"'"'date'"'"'"
  }'

# → {"ok": true, "group_id": "…", "new_group": true}

Ready to protect your software?

Get Started Free