Membership
Register

License API Document

This document provides information about the license verification system that you can integrate into your product.
As a developer, you can license your products and ensure that only licensed users can run them.


1. License Logic

  • Each product has a product_id.

  • A unique license key (license_key) is automatically generated for the customer.

  • The license is bound to a single domain and is also restricted to the buyer's email address.

  • During license verification, the system:

    1. Checks if the product exists.

    2. Checks if the license exists and is active.

    3. Verifies the domain and buyer email (the domain is automatically recorded on first run).


2. API Endpoint

URL (POST method):

https://www.kodablex.com/license/verify


3. Parameters

When sending a POST request to the API, include the following parameters:

  • license_key (string) - License key provided to the customer (automatically assigned)
  • domain (string) - The domain where the software is running
  • product_code (string) - Your product's ID (to be obtained from the system)
  • buyer_email (string) - The email address of the license owner (required to prevent unauthorized access)

4. Example Request (PHP)

$postdata = [
  'license_key' => 'XXXX-XXXX-XXXX-XXXX',
  'domain' => $_SERVER['HTTP_HOST'],
  'product_code' => '123', // Product ID
'buyer_email' => 'customer@example.com', // License owner's email
];
$ch = curl_init('https://www.kodablex.com/license/verify');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
if ($result['valid']) {
  echo "License valid: " . $result['product'];
} else {
  echo "License error: " . $result['message'];
}


5. Example API Responses

Valid License

{ "valid": true, "message": "License valid", "product": "E-Commerce Software" }

Invalid License

{ "valid": false, "message": "Unauthorized access: email mismatch" }

Product Not Found

{ "valid": false, "message": "Product not found" }