License API
License Activation/Deactivatio...

Deactivate License (Offline Method)

14min

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

Deactivates 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

If the request succeeds, the endpoint responds with the HTTP code 200 and the string license_deactivated.

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. There are multiple ways a user-based product license can be accessed when making a request:

  • By providing the values for username and password for the license user
  • By providing the values for id_token and customer_account_code if using single sign-on authentication using Implicit grant
  • By providing the values for code and customer_account_code if using single sign-on authentication using Authorization code grant
    

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.

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

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 Offline License Activation

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