Integration with your web-server


This guide describes two simple interfaces that can be used to automatically trigger operations on the Licenturion server. The idea is to enable your web-server to

 

obtain Serial Numbers, Product Keys, or Personal Product Keys from the Licenturion server on an on-demand basis and to
offer a page for manual activation to your end-users, forward the entered information to the Licenturion server, and receive an Activation Code to be displayed to an end-user from the Licenturion server.

 

Automatic generation of Serial Numbers

 

Suppose that you have an online store and that you have protected your products with Licenturion Product Activation. When an end-users buys one of your products in your online store, you would like to generate a Serial Number on the fly to be handed to the end-user.

 

This generation is accomplished by a simple HTTP POST request to the following URL.

 

https://app.licenturion.com/servlet/automaticGeneration

 

The request must contain six URL-encoded parameters:

 

user - the user name (= e-mail address) that you use to log into the Licenturion server
password - the password that you use to log into the Licenturion server
product - the product ID of the product for which you want the Licenturion server to generate Serial Numbers, e.g. "GWP" if we stick to the example given in the manual
version - the version of the product for which you want the Licenturion server to generate Serial Numbers, e.g. "1.00" if we stick to the example given in the manual
number - the number of Serial Numbers to be generated
payload - the payload to be used for the Serial Numbers

 

The Licenturion server sends an ASCII file in response to your POST request. The first line consists of a numeric result code followed by a human-readable result message. The following lines contain the generated Serial Numbers.

 

Automatic generation of Product Keys

 

This works in exactly the same way as generating Serial Numbers. Simply pass the six URL-encoded parameters to the URL given above.

 

Automatic generation of Personal Product Keys

 

This works in a slightly different way. Instead of passing the number parameter, a names parameter is required, which specifies the user IDs for which the Personal Product Keys are to be generated.

 

An example

 

The easiest way to play with this interface is to look at the sample form at

 

http://www.licenturion.com/genform.html

 

and examine its HTML source code.

 

WARNING

 

Be sure to safely store the generated Serial Numbers, Product Keys, and Personal Product Keys. They will not show up in your portfolio when you manually log into the Licenturion server.

 

Also be sure to use SSL, i.e. a URL starting with "https", when connecting to the Licenturion server. Your password is sensitive information and should never be transmitted without encryption!

 

Activation forwarding

 

Suppose that you use Licenturion Product Activation with your products. However, you do not want to send your end-users to the Licenturion activation URL for manual activation. Instead, you prefer to have your own manual activation page on your own web-server. You need a way of passing an end-user's Serial Number and a Hardware Hash to the Licenturion server and thus obtain an Activation Code to be displayed to the end-user.

 

This is accomplished by a simple HTTP POST request to the following URL.

 

https://act.licenturion.com/servlet/proxyActivation

 

The request must contain two URL-encoded parameters:

 

serNo - the Serial Number to be used for activation
hash - the Hardware Hash to be used for activation

 

The Licenturion server sends a four-line ASCII file in response to your post request:

 

The first line contains a numeric result code.
If activation was granted, the second line contains the Activation Code. Otherwise it is empty.
The third line contains the number of days left in the running reset period.
The fourth line contains the number of first-time activations left in the running reset period.

 

For more information on things like the reset period or first-time activations, have a look at the implementation manual.

 

The Licenturion server can return one of seven different result codes.

 

0 - activation successful
1 - the given Hardware Hash cannot be parsed
2 - the given Serial Number cannot be parsed
3 - the given Serial Number contains invalid information
4 - the given Serial Number has an invalid signature
5 - activation denied
6 - one of the two parameters (serNo or hash) is missing

 

You might want to simply say "invalid Serial Number" for 2, 3, and 4 instead of displaying three different messages.

 

An example

 

The easiest way to play with this interface is to look at the example form at

 

http://www.licenturion.com/actform.html

 

and examine its HTML source code.

 

WARNING

 

Be sure to use SSL, i.e. a URL starting with "https", when connecting to the Licenturion server. Serial Numbers are sensitive information and should never be transmitted without encryption!