License API
License Activation/Deactivatio...

Deactivate Bundle (Offline Method)

16min
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 type licenseofflineactivationobject = ({ // for key based licenses license key string } | { // for user based licenses username string }) & { // required properties hardware id string product string request id string signature string date string request "deactivation" } & ({ api key string // for api key authorization } | { client id string // for oauth authorization }) & { // optional properties license id? number | undefined sdk ver? string | undefined } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "allof" \[ { "oneof" \[ { "type" "object", "properties" { "license key" { "type" "string" } }, "required" \["license key"], "additionalproperties" false }, { "type" "object", "properties" { "username" { "type" "string" } }, "required" \["username"], "additionalproperties" false } ] }, { "type" "object", "properties" { "api key" { "type" "string" }, "client id" { "type" "string" }, "request" { "type" "string" }, "request id" { "type" "string" }, "date" { "type" "string" }, "signature" { "type" "string" }, "hardware id" { "type" "string" }, "product" { "type" "string" }, "license id" { "type" "number" }, "sdk ver" { "type" "string" } }, "allof" \[ { "anyof" \[{ "required" \["api key"] }, { "required" \["client id"] }] }, { "anyof" \[{ "required" \["license key"] }, { "required" \["username"] }] } ], "required" \["hardware id", "product", "date", "signature"], "additionalproperties" false } ] } signature the signature value is constructed as follows the string licensespring plus a newline the string date , plus the "date" value from the license payload object, plus a newline 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 the "hardware id" value from the request payload object plus a newline 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 import crypto from 'node\ crypto'; const activationpayload = { // payload content }; // api key or client id depending on authorization type used const key = (activationpayload api key || activationpayload client id); // if using api key authorization the signing key is the shared key // if using oauth the signing key is the client secret const signingkey = ' '; const signingstring = 'licensespring\n' + 'date ' + activationpayload date + '\n' + (activationpayload license key || activationpayload username) + '\n' + activationpayload hardware id + '\n' + key; const signature = crypto createhmac('sha256', signingkey) update(signingstring) digest('base64'); finalized payload this object is then stringified and encoded to base64, e g js browser const activationpayload = { // payload content }; const requestbody = btoa(json stringify(activationpayload)); nodejs const activationpayload = { // payload content }; const requestbody = buffer from(json stringify(activationpayload)) tostring('base64'); 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 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 docid\ xhxttcvj7gs6qeaqu7cua device variables the optional variables parameter lets you set device variables during activation for more information on how device variables work, see device variables docid\ r2cnekm7ruff u0jkm0lw 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 { status number, code string, message string } json schema { "$schema" "https //json schema org/draft/2020 12/schema", "type" "object", "properties" { "status" { "type" "number" }, "code" { "type" "string" }, "message" { "type" "string" } }, "required" \[ "status", "code", "message" ], "additionalproperties" false } 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 product not bundle (400) specified product "{code}" is not a bundle 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