Key Activation and Validation

Contents

Introduction

Serial Key Manager’s Web API allows you to both validate keys (eg. to find out whether a serial key exists in the database and isn’t blocked) and to activate keys (eg. to make sure that a key only works on a limited number of devices). Below, a short summary when the methods should be used. Note, both a serial key, key and a license refer to the same concept.

Validation

Validation can be thought of as “read only activation”. During key validation, we are only going to check that the key exists in the database and that it is not blocked. If these two conditions are fulfilled, we will obtain a KeyInformation object. In most scenarios though, Activation is a better method to use.

Activation

If you haven’t explicitly enabled features that would trigger certain changes to the key, activation will work in the same way as validation, i.e. it will be in read only mode.The advantage of using activation is that it opens doors to advanced licensing solutions. For example, you can set the number of devices that may use a license (i.e. a key) at a time.

If you think that you’ve changed certain options that could potentially trigger a change, you can set automatic activation to false (uncheck this option on the Advanced Key Details page).

Using Activation to Limit the Number of Devices

The advantage of using activation is partly in the ability to limit the number of devices that may use a single license (i.e. a serial key). For example, let’s say that your customer has purchased a key that they want to work on 30 devices (a device can be a computer, a tablet, a smartphone, etc.). This can be achieved quite easily during both key creation and for existing keys. Since it is so simple, you can always change the number of devices that may use the key at once, eg. from 30 to say 40 devices (we will look at it in Upgrading Licenses). Our aim in the examples below is to allow 30 devices to use the key.

During Key Creation

In order to specify the maximum number of devices that may use a key at once.

  1. Go to the Product page (https://serialkeymanager.com/Product) and select a Product.
  2. Press on the Create a new key button.
  3. Click on Display advanced settings.
  4. Enter 30 (or any other integer) into the Maximum number of machines textbox.
  5. Done! You now have a key that will work on 30 devices.

For Existing Keys

If you already have an existing key where:

  1. Go to the Product page (https://serialkeymanager.com/Product) and select a Product.
  2. Click on the key in the list.
  3. Press on Advanced settings button.
  4. Change the number in the Maximum number of machines textbox to 30 (or any other integer).

Upgrading Licences

The number of devices that may use a key is always adjustable. For example, say that the customer wants to allow more devices to be able to use your app. Then, you only need to change the integer to another value. Done! The next time a new application attempts to activate, it will be recorded in the control panel. Both the IP address, the machine code (a unique number used to identify the device), and the time will be recorded. You are able to access some of the details on the Advanced settings page, in the Activated Machines textbox. However, you are always able to get all of this data in a nicely formatted form by using Get Activated Machines method in the Web API.

Other Customizations to Keys

Apart from the restriction of the number of devices that may use a single key, you are also able to use the Optional Field (used for apps where there are certain quotas), Trial Activation (used to allow the trial to start once the application is activated), periodic key activation (allows you to check keys periodically and to ensure that applications in enterprise environments with no access to the Internet are still strongly protected),  and pre-configured machine codes (to ensure that some devices are always activated). Let’s look at pre-configured machines a bit more in detail.

Pre-Configured Devices

If you want to make sure that certain machines get activated, you can enter them in Allowed machine codes, one machine code per line. Note that these machine codes will be activated even if the number of activated machines is greater than maximum number of machines.

Implementation

There are at least two ways that you can implement either key activation or validation into your app. If you happen to be using .NET or Java, there exists an API that will simplify a lot of things, a called SKGL Extension. If you are using a platform that is currently not supported, you are always able to talk to the Web API directly. For almost all licensing scenarios, there exist pre-configured code snippets that are already adjusted with your settings. In case a certain scenario is not described, you are always able to ask the community for help!

Introduction

Serial key activation can occur in several ways. You can either manually register a serial key, let the client app submit the machine code or create a web interface where the machine code has to be submitted. Since the entire procedure is based on web requests, you can active a key on any platform and device. In this example, we are to use a library that already contains these methods for .NET applications (Java version is currently in Beta stage). It is open source, so you can also include it into your own application directly (download here).

SKGL Extension (.NET and Java)

In order active a key, you will have to add SKM as a reference or include the code into your application. Pre-configured code can be obtained pressing the get the code button on the product page,

code

If, however, you want to manually change the variables, they can be found here.

Examples in VB.NET can be found here.

Web API (platform independent)

The main method we used through this tutorial is Activate. If you just want to validate the key without checking whether or not it has been activated on other machines, you could use Validate instead.

Additional downloads/links

About The Author

Most Helpful User

Rate This Article

(143 out of 216 people found this article helpful)

2 Comments

  1. Usman

    Hi.

    Its been a really useful API for me so far. I am looking for a solution to find actual no of days left to license expiry, even if user changes its local date. I am using .Net Wrapper and in API 2 there is a TimeLeft field in KeyInfoResult Object, which shows actual no of days remaining even if user changes its local date.. However there isn’t such an option in V3. The DaysLeft function shows remaining days based on local time which is easily maneuverable.

    Thank you,
    Usman

    1. Hi Usman,

      Thanks for asking! I’m very happy that SKM has been useful to you!

      I see your point. One way that this can be solved in V3 is by using TimeCheck in order to see if the user has tampered with the local time and then call the days left method.

      Please let me know if you have any other questions!

      /Artem

Leave A Comment?