Create Key

Please log in to get a personalized configuration!

This method will create a new license key, which is the same as GenerateKey in Web API 2.

This method is accessed by https://app.cryptolens.io/api/key/CreateKey

Parameters

Parameter Description Remarks
ProductId the product id required
Period The number of days, from today, the license key should be valid. Note, you will still be able to activate keys that have "expired". You can enforce the expiration date in the client program. Please see Keys that don't expire tutorial. optional, 0 by default.
F1 The feature 1 (either true or false) optional. by default, it's "false"
F2 The feature 2 (either true or false) optional. by default, it's "false"
F3 The feature 3 (either true or false) optional. by default, it's "false"
F4 The feature 4 (either true or false) optional. by default, it's "false"
F5 The feature 5 (either true or false) optional. by default, it's "false"
F6 The feature 6 (either true or false) optional. by default, it's "false"
F7 The feature 7 (either true or false) optional. by default, it's "false"
F8 The feature 8 (either true or false) optional. by default, it's "false"
Notes Additional notes about the license key. Max. 500 chars. optional. by default, it's empty.
Block Blocks the key from being accessed by the Activation method. optional. by default, it's "false"
CustomerId The id of the customer that should be associated with this license key. optional. by default, it's null.
NewCustomer If set to true, you will be able to add the paramters that apply to Add Customer method to this method so that a customer is automatically created together with the license key. When setting this parameter to true, please ensure that CustomerId is not set to anything.Note: In addition to CreateKey permission, you also need to add 'AddCustomer' permission. optional. false by default.
TrialActivation Enables or disables Trial activation optional. by default, it's "false"
MaxNoOfMachines In order to restrict the number of computers that can use the same key, you can set enable this feature by enter a number greater than zero. This number represents the maximum number of computers that can activate the key. optional. by default, it's "0"
AllowedMachines A list (separated by new lines) of machine codes that will be prioritized during key activation. optional. by default, it's null.
NoOfKeys The number of keys to generate. optional. 1 by default.
v Method version. optional. by default, it's 1.

Results

Case 1: If NoOfKeys is not specified or set to 1, the followig model will be returned. Note, if format=plaintext, only the key string is returned (read more about different media types here).

Parameter Description Remarks
Key The newly generated key returned if no error occurred.
Result This is either 0(=success) or 1(=error). always returned
Message The message that provides additional information about the result. If it's a successful result, either null or the new key (if using SKGL) will be returned. Otherwise, in case of an error, a short message will be returned describing the error. always returned.

Case 2: If NoOfKeys is greater than 1, the followig model will be returned. Note, if format=plaintext, each license key string will be returned separated by new line (read more about different media types here).

Parameter Description Remarks
Keys A list of license keys that uses the same format as in Case 1. returned if no error occurred.
Result This is either 0(=success) or 1(=error). always returned
Message The message that provides additional information about the result. If it's a successful result, either null or the new key (if using SKGL) will be returned. Otherwise, in case of an error, a short message will be returned describing the error. always returned.

Example results

{"key":"ABCDE-ABCDE-ABCDE-ABCDE","result":0,"message":""}
{"keys":[{"key":"ABCDE-ABCDE-ABCDE-ABCDE","result":0,"message":null},{"key":"ABCDE-ABCDE-ABCDE-ABCDE","result":0,"message":null}],"result":0,"message":null}

Errors

Error
Access denied.
The input parameters were incorrect.
The notes field cannot be more than 500 characters.
Could not find the product.
Could not find the customer.
Creation of a license with x day(s) is not possible in SKGL. The limit is 999 days.
Generating more than 99,999 keys is not possible in SKGL.
Access denied. Please add 'AddCustomer' permission.
;