Skip to main content

Authentication

The Licentric API supports three authentication methods depending on the operation.

API Key Authentication

Used for management operations: creating and managing licenses, products, policies, entitlements, webhooks, and viewing analytics. Pass your API key as a Bearer token in the Authorization header.

Header
Authorization: Bearer lk_live_a1b2c3d4e5f6g7h8i9j0...
Key Prefixes
Live keys use the lk_live_ prefix. Test keys use lk_test_ and operate in an isolated sandbox environment.

License Key Authentication

Used for license-scoped operations: machine activation, deactivation, and heartbeats. Pass the license key with the License scheme.

Header
Authorization: License DSK-A1B2-C3D4-E5F6-G7H8

No Authentication

The POST /licenses/validate-key endpoint requires no authentication header. The license key is sent in the request body instead. This allows client-side validation without exposing API keys.

Example
curl -X POST https://your-instance.licentric.com/api/v1/licenses/validate-key \
  -H "Content-Type: application/json" \
  -d '{ "key": "DSK-A1B2-C3D4-E5F6-G7H8" }'

API Key Scopes

API keys can be scoped to limit their permissions. If no scopes are specified, the key has full access. Requests with insufficient scopes receive a 403 Forbidden response.

Available Scopes

ParameterTypeRequiredDescription
licenses:readscopeOptionalList and retrieve licenses
licenses:writescopeOptionalCreate, update, suspend, reinstate, renew, and delete licenses
machines:readscopeOptionalList and retrieve machines
machines:writescopeOptionalActivate and deactivate machines (via API key)
products:readscopeOptionalList and retrieve products
products:writescopeOptionalCreate and update products
policies:readscopeOptionalList and retrieve policies
policies:writescopeOptionalCreate and update policies
entitlements:readscopeOptionalList and retrieve entitlements
entitlements:writescopeOptionalCreate and update entitlements
webhooks:readscopeOptionalList webhook endpoints
webhooks:writescopeOptionalRegister and manage webhook endpoints
analytics:readscopeOptionalAccess dashboard analytics data
Security
Never expose API keys in client-side code. Use license key authentication or the public validate-key endpoint for client applications.