Skip to main content

Getting Started

Quickstart

Go from zero to license validation in 5 minutes.

Prerequisites
You need a Licentric account with dashboard access and at least one API key. Create your API key from the dashboard under Settings → API Keys.
Explore the API
Use the Interactive API Reference to explore endpoints, view request/response schemas, and try API calls directly from your browser.

Step 1: Create a Product

A product represents the software title you want to license. You can create one from the dashboard or via the API.

Create a product
curl -X POST https://your-instance.licentric.com/api/v1/products \
  -H "Authorization: Bearer lk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Desktop App",
    "code": "MYAPP"
  }'

Step 2: Create a License Rule

License rules (called policies in the API) define how licenses behave: max devices, duration, offline access, and more. Use a template to start with sensible defaults.

Create a license rule
curl -X POST https://your-instance.licentric.com/api/v1/policies \
  -H "Authorization: Bearer lk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Desktop License",
    "productId": "YOUR_PRODUCT_ID",
    "template": "desktop_app"
  }'

Available Templates

TemplateUse CaseDefaults
desktop_appDesktop applications with device lockingmaxMachines=2, requireFingerprint=true, offlineAllowed=true, offlineMaxDays=14
cli_toolCommand-line tools with moderate device limitsmaxMachines=3, requireFingerprint=true, offlineAllowed=true, offlineMaxDays=7
saasSaaS products with floating licensesmaxMachines=unlimited, requireFingerprint=false, floating=true, requireHeartbeat=true
trialTime-limited trial licensesmaxMachines=1, requireFingerprint=true, offlineAllowed=false, durationDays=14, isTrial=true

Step 3: Issue a License Key

Issue a license key to a customer. The key is automatically generated in the format PREFIX-XXXX-XXXX-XXXX-XXXX using the product code as the prefix.

Issue a license
curl -X POST https://your-instance.licentric.com/api/v1/licenses \
  -H "Authorization: Bearer lk_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "policyId": "YOUR_POLICY_ID",
    "email": "customer@example.com"
  }'
Customer creation is automatic
When you issue a license with an email address, a customer record is created automatically if one does not already exist.

Step 4: Create an API Key

If you have not already, create an API key from the dashboard. Keys use the prefix lk_live_ for production and lk_test_for testing. The raw key is shown only once — store it securely.

Keep your API key secret
API keys grant full management access to your account. Never expose them in client-side code, public repositories, or browser-accessible files.

Step 5: Integrate the SDK

Use a Licentric SDK in your application to validate licenses at runtime. Choose your language below.

validate.py
from licentric import Licentric

client = Licentric(api_key="lk_live_your_key_here")
result = client.validate(
    key="PREFIX-XXXX-XXXX-XXXX-XXXX",
    fingerprint="device-id"
)

if result.valid:
    print("License is valid!")
else:
    print(f"Validation failed: {result.code}")
What happens next?
On first validation, the SDK sends the license key and device fingerprint to the Licentric API. If the policy requires fingerprinting, the device is automatically activated. Subsequent validations confirm the device is still authorized.

Next Steps

  • Learn about Core Concepts to understand how products, policies, and licenses relate.
  • Read the Authentication guide to understand API key scopes and license key auth.
  • Explore Offline Licensing for air-gapped deployment scenarios.
  • Set up Webhooks to receive real-time notifications for license events.