Generate, Validate, and Manage License Keys for your WordPress Plugins and Themes.
Generate, Validate, and Manage Licenses for WordPress Plugins, Themes, And Other Software Projects
Create and manage license keys through our API or directly from your dashboard.
Start using KeyKitGenerate a new, customizable license key with one simple request. Validate it with another. Manage all of your products and license keys in one place.
// === Generate a new License Key For a Product ===
// === Request: ===
<?php
$url = 'https://keykit.io/api/v1/licenses';
$ch = curl_init($url
);
$token = YOUR_KEYKIT_API_TOKEN;
$fields = json_encode(array(
'product_ref'=>
'prod_118830f35b2c0779ccac'
));
$authorization = "Authorization: Bearer ".$token;
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
$authorization));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$result = curl_exec($ch);
curl_close($ch);
# === Response: ===
echo $result;
{
"data": {
"id": "25",
"type": "license_key",
"attributes": {
"key": "a9e48217-203c-4c8a-b5cb-933fd4c95e06",
"status": "pending",
"activated_at": null,
"expired_at": null,
"expired": false
}
}
}
// Get The License Key:
echo $result["data"]["attributes"]["key"];
"a9e48217-203c-4c8a-b5cb-933fd4c95e06"
// === Generate a new License Key For a Product ===
// === With Curl ===
// === Request: ===
curl https://keykit.io/api/v1/licenses\
-H 'Authorization: Bearer "<YOUR_API_TOKEN>"' \
-F product_ref=prod_118830f35b2c0779ccac \
-F expired_at=2020-11-01 \
// === Response: ===
{
"data": {
"id": "25",
"type": "license_key",
"attributes": {
"key": "a9e48217-203c-4c8a-b5cb-933fd4c95e06",
"expired_at": null,
"status": "pending",
"activated_at": null,
"expired": false,
}
}
}
# === Generate a new License Key For a Product ===
# === With Ruby: ===
# === Request: ===
require 'httparty'
url = 'https://keykit.io/api/v1/licenses'
body = { product_ref: "prod_118830f35b2c0779ccac" }
headers = { "Authorization": "Bearer #{YOUR_API_TOKEN}" }
response = HTTParty.post(url, body: body, headers: headers)
# === Response: ===
puts response.body
{
"data": {
"id": "25",
"type": "license_key",
"attributes": {
"key": "a9e48217-203c-4c8a-b5cb-933fd4c95e06",
"expired_at": null,
"status": "pending",
"activated_at": null,
"expired": false
}
}
}
# Your new license key:
puts response.body['data']['attributes']['key']
# => 'a9e48217-203c-4c8a-b5cb-933fd4c95e06'
// === Generate a new License Key For a Product ===
// === With Node ===
// === Request: ===
const request = require('request');
var options = {
method: 'POST',
body: {
product_ref: 'prod_118830f35b2c0779ccac'
},
json: true,
url: 'https://keykit.io/api/v1/licenses',
headers: {
'Authorization':'Bearer <YOUR_API_TOKEN>'
}
};
request(options, function (error, response, body) {
console.log(response.body)
});
# === Response: ===
{
"data": {
"id": "25",
"type": "license_key",
"attributes": {
"key": "a9e48217-203c-4c8a-b5cb-933fd4c95e06",
"expired_at": null,
"status": "pending",
"activated_at": null,
"expired": false
}
}
}