Skip to main content

Idea

Trial activation allows you to pre-generate time-limited licenses so that the time-limit starts from the first day of activation. This is especially useful when you don’t know in advance when the license key will be used for the first time.

Getting started

By default, a newly generated license key does not have this option enabled. In order to enable it,
  1. Go to https://app.cryptolens.io/Product
  2. Select the product you want to use.
  3. Click Create new key
  4. Tick start countdown upon activation
  5. Set the Maximum number of machines to 1. (note, this value can be anything greater than zero for this feature to work)
  6. Click Create.
If your set time was set to 30 (as an example), then if the user activates the license key in 2 months from now, they will still be able to use the license for 30 days.

Remarks

Please read these through before you start using feature in production.

Maximum number of machines greater than 1

Update from 2021-07-26: It is now possible to configure it so that the license is extended only when the first device activates, independent of the value of Maximum number of machines. To do that, you need to create a data object (inside the product) with the name “cryptolens_trialactivation” and string value “first_activation”.
Trial activation feature ensures that each new machine code can use the license for a set number of days (specified in set time / period). However, since the “expiration date” is global for the license (shared among all machines), setting maximum number of machines to a value greater than 1 will allow the old machines to use the license until the last machine expires. It is possible to change this behaviour at the product level by adding a data object named cryptolens_trialactivation and setting its string value to one of the following options, depending on the desired behaviour of the method.
  1. Default behaviour = expiry date will be extended until the limit of the maximum number of machines is reached. For example, let’s say you set the maximum number of machines to 2 and the time to 30 (this value is referred to as the period on the product page). When the first machine activates the licence, the expiry date will be extended so that the licence can be used for 30 days. After those 30 days have passed, the second machine activates the licence, which will extend the expiry date by another 30 days. The original machine will still be able to use the licence.
  2. first_activation = This will extend the expiry date only for the first activation. Subsequent activations will not extend the date. Please note that if all machines are deactivated and the licence is activated again, the expiry date will be extended once more for the first activation.
  3. disable_on_first_activation = This behaves the same way as first_activation, except that the feature which starts the countdown upon activation is disabled at the licence level after the first activation. In practice, this means that the expiry date will be extended only once.
  4. disable_on_first_activation_v2 = Similar to disable_on_first_activation, the feature that starts the countdown upon activation will be disabled at the licence level. However, it will otherwise behave in the same way as the default behaviour for that request, meaning that if a new machine is activated, the expiry date will be extended.

SKGL key generation algorithm

We recommend to always use SKM15, which is the default for all newly created products. Using SKGL will update the license key string, which is described here.

Hard coding licenses

Never hard code a trial key into your application. Although the trial will not be extended if only one user is using it, once we allow multiple users to activate the trial (for the same key), they will update the global trial count. If you need trial key functionality, please take a look at verified trials.