Skip to main content

llkOfflineActivationRequest

Description​

Offline activation is useful when the end user's PC with protected software is temporarily or permanently offline

Offline Activation suitable cases​

Offline Activation can be easily used to have a chance to activate and initialize the environment If the user's PC is

  • Temporarily offline, for example travel, Internet connection problems, etc.
  • Permanently offline, i.e. secure environments such as government, banking, etc.

By following the simple steps described below, the License can be activated and initialized on the PC of the end user​

  • Generate a Request Code using llkOfflineActivationRequest function
  • Use an internet-enabled device to complete the activation of an Entitlement accorded with a generated Request Code

After the successful Request Code generation there is two ways to activate the entitlement

  • First way is the Cloud Control Panel, on the Entitlements page, using the Offline Activation button
  • Second way is the command line utilities, as in the example below:
note

Request Code is machine-specific and valid for 72 hours. If it takes longer than 72 hours to complete this process, simply generate a new Request Code

CURL
curl -X POST -k https://licentrix.tech/v3/activations/offline/bulkActivate -d "${REQUEST_CODE}"

Example of successful CURL request

{
"Response": {
"description": "Activation succeed.",
"developerMessage": "Activation succeed. To get more information, visit: https://doc.licentrix.tech/docs/enumerations/LLKStatus",
"errorCode": 0
},
"activation": {
"licenseKey": "AM0...mnQ="
}
}

Save the value of the licenseKey, for example in license.l2c file. Copy the license.l2c file to user's PC, specify the PathToSaveTheLicenseData and the next call of llkActivateLicense will initialize the environment

Example of failed CURL request

{
"Response": {
"description": "The system time has been changed, expired the allowed period for offline activation.",
"developerMessage": "The system time has been changed, expired the allowed period for offline activation. To get more information, visit: https://doc.licentrix.tech/docs/enumerations/LLKStatus",
"errorCode": 13
}
}

In this example, we can see that the Request Code has expired

Syntax​

llkOfflineActivationRequest
LLK_API LLKStatus llkOfflineActivationRequest(const char* scopeJSON);

Parameters​

ParamDescription
scopeJSONRequest Code generation parameters in JSON format, details below

Example of scopeJSON​

scopeJSON
{
"VendorID": "15cva7cyd4q0-a1f8t5d056b5",
"SerialNumber": "989e79-140a9f1aw880-323b973g960d",
"PathToSaveTheRequest": "RequestCode.txt",
}
FieldDescription
VendorID (Vendor Code)Located at the top of the Entitlements page
SerialNumberSerial numbers are on the Entitlements page
PathToSaveTheRequestLocal path to save the generated Request Code

Return Values​

Status CodeNo.Description
LLK_OK0Request was successfully completed. The operation status is successful
LLK_INVALID_PARAMETER1The parameter scopeJSON is invalid (null pointers are forbidden)
LLK_NETWORK_ERROR14Network error. A service was denied by the server due to lack of access
LLK_INVALID_SERIAL_NUMBER15Invalid SerialNumber (empty or length error). Maybe the Vendor canceled the entitlement. Can't be passed as empty string
LLK_INVALID_VENDOR_CODE18Invalid Vendor Code. The field VendorID can't be passed as empty string
LLK_INVALID_FORMAT19Invalid JSON format. The parameter scopeJSON can't be passed as empty string, or contains invalid fields
LLK_OFFLINE_ACTIVATION_FILE_PATH_IS_EMPTY20Invalid path. The field PathToSaveTheRequest can't be passed as empty string
LLK_INTERNAL_TRY_AGAIN701Internal error. Please try again, or contact development team if retry was not helpful

Examples​

C++ example
 const json& inputJSON =
{
{ "VendorID", vendorID },
{ "SerialNumber" , serialNumber },
{ "PathToSaveTheRequest" , pathToSaveTheRequest }
};

const LLKStatus status = llkOfflineActivationRequest(inputJSON.dump().c_str());
std::cout << "ErrorCode: " << llkStatusDescription(status) << std::endl;

Example of a successful operation

ErrorCode: The operation status is successful.

In case of success, the Request Code will be stored in the file at the specified path

IMPORTANT

Save the value of the licenseKey, for example in license.l2c file. Copy the license.l2c file to user's PC, specify the PathToSaveTheLicenseData and the next call of llkActivateLicense will initialize the environment


Version history​

  • Added in version 1.1.0