Create Key From Template

This method will create a license key based on a License Template. If you want to see all the defined license templates through the API, this can be accomplished with Get License Templates. An alternative is to call the Create Key method, which allows you to specify all the parameters yourself. Note: the "feature lock" field in the access token can be used to restrict which license tempalte id can be used.

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

Parameters

Parameter Description Remarks
LicenseTemplateId The id of the license template. required
v Method version. optional. by default, it's 1.

Results

Parameter Description Remarks
Result This is either 0(=success) or 1(=error). always returned
Key The license key string of the newly generated license always returned
RawResponse Properties extracted from the underlying API response, formatted as JSON. always returned
Message The message that provides additional information about the result. always returned.

Example results

{"key":"MWYXE-VBPFS-OMNDM-GRJRY","rawResponse":"{\"key\":\"MWYXE-VBPFS-OMNDM-GRJRY\",\"result\":\"Success\",\"message\":null}","result":0,"message":null}

Errors

Error
Access denied.
The input parameters were incorrect.
The specified template id is not allowed because feature lock. Please use an access token with feature lock set to 0 or set it to the id of the license template.
Could not find the license template.
Could not find the key.
;