Quick Start #
To generate new keys, go to Dashboard > Create Keys. Use the fields provided to enter the necessary information and press the Generate New Keys button. Within seconds your keys will be created and available for use. You can see your new keys in your key library, found at Dashboard > Key Library.
What Type Of Key Do You Need? #
You can create keys using several different licensing models. You can create Perpetual Licenses, Subscription-Based Licenses, Trial Licenses, Limited Time Licenses, Token-Based Licenses, Date-Based Expiration Licenses, Node-Locked Licenses, and Floating Licenses with our system.
NOTE: All of these settings can be set during key generation and are also editable after key creation via a key’s details page.
Creating Perpetual Licenses #
This is the default settings, simply create the key as is. We offer perpetual licenses with manual overrides, meaning they will work forever unless you turn them off. Since you have the ability to turn them off you can also offer subscription-based licenses.
Creating Subscription-Based Licenses #
Subscription-based keys are normal keys that are managed differently in the Key Library, so create a key normally with default settings. Then, if a user ever cancels their subscription search for the key in your Key Library and deactivate it. The key will now return as invalid until you reactivate it.
If your user renews their subscription then reactivate the key and it will continue to work normally.
NOTE: To stay deactivated until you turn it back on, a key must have 1.) already been automatically activated at least once before, and .2) still have at least one domain and/or UUID assigned to it. Otherwise the key will be treated as if it is ready to be activated and will be reactivated and return as valid during the next key check.
Creating Trial / Limited Time Licenses #
Click the “Yes” on ” Trial/Limited Time Keys” to reveal the settings. Set the amount of days you want the key to operate after activation and then click Generate New Keys. This time starts when the key is activated. Once the amount of days specified have passed the key will send back an invalid (valid : 0) response.
Example uses are:
- Setting the days to 14 to allow a 14 day trial.
- Setting the days to 365 for a one year limited time use key.
Creating Token-Based Licenses #
Click the “Yes” on “Token-Based Keys” to reveal the settings. Set the maximum amount of tokens the key can hold.
Inside your app’s code, when you preform a key check that should consume a token, send the header “consume” with the amount of tokens to consume. Here is an example in PHP using cURL:
$tokenCost = 4; // Action cost 4 tokens
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'auth: ' . $authKey,
'key: ' . $licenseKey, // Set the authentication key in the request headers
'domain: ' . $_SERVER['HTTP_HOST'], // Set the domain in the request headers
'consume: ' . $tokenCost // Set the token's consume value
));
The API will send this data to be processed and….
- If the amount of tokens being consumed is less than or equal to the tokens left on the key
- Send back a valid (valid : 1) response and subtract the cost of the tokens.
- If the amount of tokens being consumed is more than the amount of tokens left on the key
- Send back an invalid (valid : 0) response.
You can use this information in your app to either approve or deny the actions consuming the tokens.
Restoring Used Tokens #
You can restore tokens by sending a negative number via “consume”. By doing this you can renew end user token keys as needed.
Here’s an example scenario… your user purchases a subscription with 1,000 token uses per month. During the month they will consume tokens until they hit the max. Once their subscription renews every month you send an automated API call with a negative token value of -1,000 to reset their usage back to 0. Token usage cannot go below 0 by design, so sending more negative tokens than a user has will also result in a 0.
$tokenCost = -1,000; // Restoring all tokens for the month
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'auth: ' . $authKey,
'key: ' . $licenseKey, // Set the authentication key in the request headers
'domain: ' . $_SERVER['HTTP_HOST'], // Set the domain in the request headers
'consume: ' . $tokenCost // Set the token's value
));
See our documentation on sending “consume” headers for token-based keys for more information.
Creating Date-Based Expiration Licenses #
Click the “Yes” on “Hard Expiration Date” to reveal the settings. Click the calendar and set the year, month, day, hour, and minute. The key will be valid until this time and once this time passes the key will send back an invalid (valid : 0) response.
Creating Node-Locked Licenses #
To tie a specific domain or device (a “node”) to a license, pre-set the domain and/or UUID to the key. It will only be usable on that particular node. You can do this before generating a batch of keys if you need a lot of keys for the same domain/device, or you can set them later individually for each key in the key’s details.
Creating Limited Floating Licenses #
Our floating license model works slightly different than some others. Instead of limiting how many domains/devices can use a key at any one point in time, you lock the total Domains/UUID’s that can ever use the key to a specified number.
This means, for example, if you want ten different devices to be able to use your app at the same time then set the Max UUID’s to 10. Once those ten devices sign up no other device can ever use that key unless you remove a UUID from the record or allow more UUID’s.
Creating Unlimited Floating Licenses #
To create an unlimited floating license (meaning an unlimited amount of domains/UUID’s can use a single key, set the max domain/UUIDs to 0 (unlimited) either during key generation or afterwards in your Key Library. You can set max domains and UUID’s in bulk or individually.
NOTE: Allowing a key to activate on an unlimited amount of domains/devices can pose a security risk if that key ever leaks. Keys will still record the domain/devices even when set to unlimited, so if you see unusual activity consider limiting or replacing that key.
The Key Generation Form #
To generate keys with default settings, simply enter the number of keys you would like to generate and hit Generate New Keys. The default settings will allow a key to work on only one domain and/or one device device.
You can generate from one key at a time up to the maximum amount of keys provided by your plan all at once. If you try to generate more keys than your plan allows our system will create as many keys as possible up to your maximum amount.
Domain / UUID Key Settings #
Before generating a batch of keys you can change the domain and UUID settings. You can also use the tools in your Key Library to change these limits for each individual key or in bulk. You can set limits on how many domains (websites) and/or UUIDs (devices) a key can work on, and you can preset specific domains/UUIDs too.
For example, you could set a batch of keys to only work on a maximum of three domains. You could also define those domains if you want to ensure the keys only work on those domains. The same can be done for UUIDs.
You can set the amount of domains/UUIDs to anything you want. You can change just the domain settings, just the UUID settings, or both, or none. It entirely depends on your situation.
NOTE: Setting the max domains/UUIDs to 0 allows the keys to be installed on an unlimited amount of domains/devices.
Which Max Domain/UUID Settings Is Right For You #
Generally speaking, it’s best to set a key to only work on one domain or one UUID unless you have a reason to add more. This will ensure the key only works on the first domain/UUID it is locked to.
However, there are several reasons to add more domains/UUIDs, such as if you offer tiered pricing plans that allows multiple installs or even unlimited installs. In that case, adjust the settings accordingly.
Do Your Keys Need Domain Locking Or UUID Locking? #
If your app will be a part of a website, such as a plugin or theme, it will most likely be installed on a webserver with a domain. In this case your app will send the domain along with the API check and the key will be locked to that domain.
If your app is a piece of software, such as a video game or a stand-alone app, that runs on a Windows, Mac, or Linux PC or other device you will use UUIDs. Your app will generate a UUID on the same device the key is being activated on and will send that UUID along with the key whenever you send a key check to the API. The key will be locked to that UUID, and therefore to that device.
Viewing New Keys #
After a moment your new keys will appear in your key library, found at Dashboard > Key Library.