Getting Started
Quickstart
Go from zero to license validation in 5 minutes.
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.
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.
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
| Template | Use Case | Defaults |
|---|---|---|
| desktop_app | Desktop applications with device locking | maxMachines=2, requireFingerprint=true, offlineAllowed=true, offlineMaxDays=14 |
| cli_tool | Command-line tools with moderate device limits | maxMachines=3, requireFingerprint=true, offlineAllowed=true, offlineMaxDays=7 |
| saas | SaaS products with floating licenses | maxMachines=unlimited, requireFingerprint=false, floating=true, requireHeartbeat=true |
| trial | Time-limited trial licenses | maxMachines=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.
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"
}'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.
Step 5: Integrate the SDK
Use a Licentric SDK in your application to validate licenses at runtime. Choose your language below.
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}")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.