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.

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"
  }'

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."
}

Ready to protect your software?

Get Started Free