License API
License Activation/Deactivatio...

Activate License (Offline Method)

18min

Currently we support trial, perpetual and consumption license types for offline activation purposes

Activates a license for a specific computer identified by hardware ID using the ls_activation.req file
POST
Request
Header Parameters
Date
required
String
In RFC7231 format (see "License API Authorization"), eg.: Thu, 17 Nov 2022 20:51:35 GMT
Authorization
required
String
See "License API Authorization" article
Body Parameters
Payload
required
Object
Base64 encoded JSON object containing the key-values below:
Curl
Node.js
JS
Python
Ruby
Responses
200
400


Schema

Request Body

The request body is a string representing a base64-encoded JSON object containing all the required activation data.

If using "multipart/form-data" for the request, the "file" form parameter is mandatory

TypeScript
JSON


Signature

The signature value is constructed as follows:

  1. The string licenseSpring plus a newline
  2. The string date, plus the "date" value from the license payload object, plus a newline
  3. Either the "license_key" or "username" value from the request payload object (which ever is present on the license, see the License Authorization Method section below) plus a newline
  4. The "hardware_id" value from the request payload object plus a newline
  5. The "api_key" value from the request payload object

This complete string is then encrypted using HMAC-SHA256 and the company shared key as the encryption key.

JS


Finalized payload

This object is then stringified and encoded to base64, e.g.:

JS Browser
nodeJS


Response Body

TypeScript
JSON


Response Signature

The response objects two digital signatures which the client app can use to verify the authenticty of the response:

  1. license_signature is the HMAC-SHA256 signature explained in the Response Signature article
  2. offline_signature is an additional HMAC-SHA256 signature specific to this endpoint. This value is constructed identically to the signature parameter in the request payload (see Signature above) using the date value received in the response

License Authorization Method

There are two types of product licenses based on how the client application authorizes itself to interact with a license:

Key-based product licenses

Each license assigned to the product requires the client to provide a license key in order to activate, check or deactivate the license (property license_key in the request body).

The license response object will contain the license_key property, and the property product_details.authorization_method will be the string license_key.

User-based product licenses

Each license assigned to the product has a corresponding "license user" instead of a license key. Requires username and password to be provided.

In the license response object, product_details.authorization_method will have the string value user and the response object will contain the user object with information on the license user.

License Types

The license_type property defines one of the 4 types of licenses based on their duration and how the license is used:

  • Perpetual: perpetual
  • Time-limited: time-limited
  • Subscription: subscription
  • Consumption: consumption

For more information see: License Types

Device variables

The optional variables parameter lets you set device variables during activation. For more information on how device variables work, see Device Variables

Errors

If an error occurs, the response will have an HTTP status code of 400 or higher, and the response body will contain an error description in the following format:

TypeScript


List of exceptions

missing_headers (400): some headers are missing
  • when missing authorization or date headers
missing_parameters (400): some parameters are missing in the request: different, parameters
  • when no request body at all or no file found in request body
authorization_missing_params (400): some parameters are missing in authorization: different, parameters
  • when has request body but request body is not properly base 64 encoded
  • when file is missing in request body
  • when license_key or hardware_id body parameters are missing
  • when data body parameter is missing
  • when api_key parameter is missing

Please note that the body is text, aka base64 encoded json

If you want to use this api endpoint directly, instead of using SDK, which does most of heavy lifting for you, please contact us for additional instructions

Guide on using offline Licenses

If any aspect of the offline licensing model remains unclear or raises questions, we encourage you to explore our in-depth guide on link

This resource offers a comprehensive explanation of the offline licensing process, how it operates, and ways to utilize its advantages for your specific software applications