Licence Validation API
Validate licences issued from the SnoozStudios Developer Dashboard and enforce server activation limits in your own software.
Validate a developer licence
POST https://www.snoozstudios.com/api/developer/verify.php Content-Type: application/json Accept: application/json
JSON request
{
"product_id": "DEVPROD-1234567890ABCDEF",
"license_key": "DEV-ABCDE-12345-F67890-ABCDE",
"server_id": "your-stable-server-id"
}
product_id — Public Product ID from the Developer Dashboard.
license_key — customer licence key issued by the developer.
server_id — stable ID for that server installation.
Valid licence
HTTP 200
{
"valid": true,
"status": "active",
"expires_at": "2026-10-10 12:00:00",
"activation_count": 1,
"activation_limit": 5,
"remaining_activations": 4
}
Activation limit reached
HTTP 403
{
"valid": false,
"status": "activation_limit",
"activation_count": 5,
"activation_limit": 5,
"remaining_activations": 0
}
Java 11+ example
import java.net.URI;
import java.net.http.*;
import java.time.Duration;
public class SnoozLicenseClient {
private static final String ENDPOINT =
"https://www.snoozstudios.com/api/developer/verify.php";
public static boolean validate(
String productId,
String licenseKey,
String serverId
) throws Exception {
String json = String.format(
"{\"product_id\":\"%s\",\"license_key\":\"%s\",\"server_id\":\"%s\"}",
productId, licenseKey, serverId
);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(ENDPOINT))
.timeout(Duration.ofSeconds(8))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response =
HttpClient.newHttpClient().send(
request,
HttpResponse.BodyHandlers.ofString()
);
return response.statusCode() == 200 &&
response.body().contains("\"valid\":true");
}
}
Use a proper JSON parser in production and handle temporary network failure safely.
PHP example
$payload = json_encode([
"product_id" => "DEVPROD-...",
"license_key" => "DEV-...",
"server_id" => "my-server-id",
]);
$ch = curl_init("https://www.snoozstudios.com/api/developer/verify.php");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Accept: application/json",
],
CURLOPT_TIMEOUT => 8,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$result = json_decode($body, true);
if ($status === 200 && !empty($result["valid"])) {
// Licence is valid.
}
Use a stable Server ID
The same server_id can validate repeatedly without using another activation.
A good pattern is to generate a UUID once on first startup, save it in the plugin data folder, and reuse it.
Do not generate a new random ID for every request.
Common results
| Status | Meaning |
|---|---|
active | Licence is valid for this product/server. |
activation_limit | All permitted server activations are already in use. |
expired | The issued licence has expired. |
invalid | The licence is invalid, revoked or unavailable. |
product_invalid | The Public Product ID is invalid or disabled. |
developer_plan_inactive | The product owner no longer has an active SnoozStudios developer licensing plan. |
Integration recommendations
Use HTTPS only. Never publish licence keys in logs, crash reports or public configuration examples.
Use a short grace/caching strategy for temporary network failures so a short outage does not instantly stop a production server. Do not cache validation indefinitely.
Keep Server IDs stable and do not rotate them to bypass activation limits.
