Check License Key Authorisation
Added in v1.0
POST
https://api.example.com/api/checkRequires authentication: x-api-key: YOUR_LICENSE_KEY
The API returns a JSON response indicating whether the license is valid.
Note: This route does not use your API key. The
x-api-keyheader holds the license key being checked.
Headers
x-api-keystringrequiredThe license key being checked.Content-TypestringrequiredMust beapplication/json.
Body parameters
idintegerrequiredThe product ID the license key must belong to.infostringoptionalText saved to the license log on a successful check.
Responses
- 200OK
- 400No License key
- 403IP Not Authorised
Request
curl -X POST 'https://api.example.com/api/check' \
-H 'x-api-key: YOUR_LICENSE_KEY' \
-H 'Content-Type: application/json' \
-d '{
"id": 123,
"info": "My application v1.0.0"
}'
const res = await fetch('https://api.example.com/api/check', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_LICENSE_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ id: 123, info: 'My application v1.0.0' })
});
const result = await res.json();
import requests
res = requests.post(
'https://api.example.com/api/check',
headers={'x-api-key': 'YOUR_LICENSE_KEY'},
json={'id': 123, 'info': 'My application v1.0.0'}
)
result = res.json()
$ch = curl_init('https://api.example.com/api/check');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-api-key: YOUR_LICENSE_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'id' => 123,
'info' => 'My application v1.0.0'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
200 OK
{
"status": "AUTHORISED",
"pass": true,
"details": "Authorisation completed - example.com"
}
400 No License key
{
"status": "NOT FOUND",
"pass": false,
"details": "No key was provided"
}
403 IP Not Authorised
{
"status": "NOT AUTHORISED",
"pass": false,
"details": "The supplied IP is not authorised - example.com"
}
Discussion 0
Reading is open to everyone. Posting, replying, reacting and reporting require a Discord account — we only receive your public username and avatar.
No comments yet. Sign in with Discord to start the conversation.
Sign in required
Reading is open to everyone. Posting, replying, reacting and reporting require a Discord account — we only receive your public username and avatar.