Check license authorization
Added in v1.0
POST
https://api.example.com/api/check/{id}
Requires authentication:
X-API-Key: YOUR_API_KEY
The API returns a JSON response indicating whether the license is valid.
Path parameters
-
idinteger requiredExample:123
Query parameters
-
infostring optionalExample:Login attempt
Responses
- 200Authorised
- 200Disabled
- 200Inactive
- 200Not found
- 400No key
Request
curl -X POST 'https://api.example.com/api/check/123?info=Login%20attempt' \
-H 'X-API-Key: YOUR_API_KEY'
const response = await fetch('https://api.example.com/api/check/123?info=Login%20attempt', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.post(
"https://api.example.com/api/check/123?info=Login%20attempt",
headers={
"X-API-Key": "YOUR_API_KEY",
},
)
print(response.json())
<?php
$ch = curl_init('https://api.example.com/api/check/123?info=Login%20attempt');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'X-API-Key: YOUR_API_KEY',
],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($response);
Response
Authorised
{
"status": "AUTHORISED",
"pass": true,
"details": "Authorisation completed - example.com"
}
Disabled
{
"status": "KEY DISABLED",
"pass": false,
"details": "This license key has been disabled by an administrator"
}
Inactive
{
"status": "NOT ACTIVE",
"pass": false,
"details": "The supplied key is not active"
}
Not found
{
"status": "NOT FOUND",
"pass": false,
"details": "The supplied license key was not found. Please check your auth key is correct"
}
No key
{
"status": "NOT FOUND",
"pass": false,
"details": "No key was provided"
}