Licensor

API Client Overview

Integrate WiLicensor licensing into your applications with our simple REST API.

Base URL

https://your-server.com/api

Replace your-server.com with your WiLicensor server address.

Authentication

The public API endpoints require no authentication. License validation is performed using:

Available Endpoints

Endpoint Purpose
/api/check Validate a license key
/api/find Find and activate a license with machine binding
/api/gen Generate or retrieve a license key
/api/replace Transfer license to a new machine

Key Encryption

License keys are encrypted using the machine ID combined with the user's email for uniqueness. Your client application must:

  1. Get the unique machine identifier (hardware ID, volume serial, etc.)
  2. Combine with user's email: machineId + email
  3. Generate the encrypted key using the same algorithm as the server
  4. Send the encrypted key in API requests

Note: The server accepts both new format (machineId + email) and legacy format (machineId only) for backwards compatibility. New clients should use the combined format.

See language-specific documentation for encryption implementation.

Response Format

All responses are JSON. Successful responses return license data:

{
  "key": "encrypted_key_string",
  "condition": "activated",
  "type": "trial",
  "machineId": "abc123def456",
  "productId": 1,
  "email": "user@example.com",
  "settings": "1",
  "endAt": "2025-12-25T00:00:00.000Z"
}

Error responses:

{
  "error": "Error description"
}

License Conditions

Condition Meaning
activated License is active and valid
purchased Paid license, not yet activated
expired Trial or subscription has expired
deactivated License was manually deactivated

License Types

Type Meaning
trial Time-limited trial license
lifetime Permanent license
subscription Recurring subscription
demo Demo/evaluation license

Client Libraries

Error Handling

Always handle these scenarios:

  1. Network errors - Server unreachable
  2. Invalid key - Wrong encryption or tampering
  3. Expired license - Check condition and endAt
  4. Machine mismatch - License bound to different machine

Rate Limiting

Currently no rate limiting is enforced. However, best practices:


Back to Documentation