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
usingllkOfflineActivationRequest
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 theOffline Activation
button - Second way is the command line utilities, as in the example below:
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β
Param | Description |
---|---|
scopeJSON | Request Code generation parameters in JSON format, details below |
Example of scopeJSON
β
scopeJSON
{
"VendorID": "15cva7cyd4q0-a1f8t5d056b5",
"SerialNumber": "989e79-140a9f1aw880-323b973g960d",
"PathToSaveTheRequest": "RequestCode.txt",
}
Field | Description |
---|---|
VendorID (Vendor Code) | Located at the top of the Entitlements page |
SerialNumber | Serial numbers are on the Entitlements page |
PathToSaveTheRequest | Local path to save the generated Request Code |
Return Valuesβ
Status Code | No. | Description |
---|---|---|
LLK_OK | 0 | Request was successfully completed. The operation status is successful |
LLK_INVALID_PARAMETER | 1 | The parameter scopeJSON is invalid (null pointers are forbidden) |
LLK_NETWORK_ERROR | 14 | Network error. A service was denied by the server due to lack of access |
LLK_INVALID_SERIAL_NUMBER | 15 | Invalid SerialNumber (empty or length error). Maybe the Vendor canceled the entitlement. Can't be passed as empty string |
LLK_INVALID_VENDOR_CODE | 18 | Invalid Vendor Code. The field VendorID can't be passed as empty string |
LLK_INVALID_FORMAT | 19 | Invalid JSON format. The parameter scopeJSON can't be passed as empty string, or contains invalid fields |
LLK_OFFLINE_ACTIVATION_FILE_PATH_IS_EMPTY | 20 | Invalid path. The field PathToSaveTheRequest can't be passed as empty string |
LLK_INTERNAL_TRY_AGAIN | 701 | Internal 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
Save the value of the
licenseKey
, for example inlicense.l2c
file. Copy thelicense.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