Creates a brand new license for your end user.
- email = (string) end user’s valid email address. Limitations: string can have a maximum of 48 characters.
- max = (unsigned integer) maximum number of machine IDs that can be associated with the license activation code. Default: 1 if max is not set.
- data = (string) product information string to associate with license. Limitations: string can have a maximum of 1024 characters.
- send = (any value) If send is specified, the developer email template is sent to end user’s email address upon successful license creation. Requirements: your developer email settings and template must be configured in the License Developer Panel.
Quick PHP Example
This example creates a new license for the end user
firstname.lastname@example.org that can be activated for up to 5 different unique machines. The product information associated with the license’s data will be “Basic Version Only”. If the end user purchased the basic version of the software, then the example application will use this data to give the user access to only basic software functions. Of course, as always, the example application must supply the logic to perform this task. Upon creation of the license, the licensing server will use the developer’s stored email template and SMTP settings to automatically generate an email for the end user–supplying them with their license activation code.
$params = array( 'call' => 'create', 'sig' => YOUR_API_SIGNATURE, 'email' => 'email@example.com', 'max' => 5, 'data' => 'Basic Version Only', 'send' => true ); $result = LicenseAPI($params);
Successful Return String
create returns the license’s alias. Consider the license alias to be a safe-to-store reference to the license code. License alias’s are “safe to store” because they cannot be used to activate a machine, and therefore are safe to store on a user’s local filesystem, registry, database, etc. This creates a layer of security so that the end user’s license activation code is only in their initial email, or whatever piece of paper the end user may have written the code on! Example return string:
The license alias is important for most Application API functions, so you may want to securely store this value on the end user’s machine running your deployed code.
Unsuccessful Return Strings
U = Unable to create license because the license use limit has been reached. You will need to extend your Developer Account’s available license slots in order to create more licenses.
F = Failed to create the license. Check that you are using your API signature or that a valid email was supplied.