API Integration & Developer Documentation
Comprehensive developer specifications for authenticating client applications, validating licenses, enforcing hardware device fingerprints, and managing usage quotas atomically.
Overview & Architecture
LicenseServer is a zero-trust software license verification backend. All authorization decisions, token counts, expiration dates, and hardware binding rules are enforced strictly server-side. The client application acts purely as a consumer and never serves as a source of truth for license validity.
Authentication & Base URL
License API requests do not require static API keys. Instead, every call is authenticated via the combination of your License Token and the client machine's Hardware Device Fingerprint.
https://apilicense.my.id/public/api/license
Content-Type: application/json Accept: application/json
/api/license/validate
Executes full multi-step validation: checks token validity, expiration, device hardware fingerprint binding, maximum allowed devices, and remaining usage limits.
Parameter Request
Hanya Butuh Token| Field | Type | Requirement | Keterangan |
|---|---|---|---|
| token | string | Required | Token lisensi unik software (contoh: PS-PREM-8F2K9X7M). Hanya ini yang wajib dikirim! |
| device_name | string | Optional | Nama/label perangkat kustom (opsional). Jika dikosongkan, server otomatis mendeteksi nama hostname/OS. |
Anda tidak perlu repot membuat device_fingerprint manual. Saat script dijalankan, sistem server akan secara otomatis mendeteksi hardware (OS, Platform, IP, dan identitas fisik) perangkat client dan langsung mendaftarkannya ke dashboard perangkat website Anda!
Contoh Integrasi Kode (Terpisah & Siap Pakai)
Success Response (200 OK)
{
"status": "authorized",
"valid": true,
"success": true,
"registered": true,
"license_tier_name": "Premium",
"remaining_token": 650,
"is_unlimited": false,
"usage_count": 350,
"limit_type": "Usage Count",
"device_authorized": true,
"server_time": "2026-09-11T21:20:01+07:00",
"expires_at": "2026-09-20T21:20:01+07:00"
}
/api/license/check
Returns the latest server-side token quota, dynamic license tier, device authorization status, and server timestamp without consuming usage units.
curl -X POST "https://apilicense.my.id/public/api/license/check" \
-H "Content-Type: application/json" \
-d '{"token": "PS-PREM-8F2K9X7M"}'
{
"success": true,
"registered": false,
"status": "NOT_REGISTERED",
"license_tier_name": null,
"remaining_token": 0
}
{
"success": false,
"registered": true,
"status": "DEVICE_NOT_AUTHORIZED",
"license_tier_name": "Premium",
"remaining_token": 0,
"device_authorized": false
}
/api/license/usage
Secara atomik mencatat eksekusi tugas di server dan mengurangi sisa kuota lisensi sebanyak 1 poin. Aman terhadap race conditions.
curl -X POST "https://apilicense.my.id/public/api/license/usage" \
-H "Content-Type: application/json" \
-d '{"token": "PS-PREM-8F2K9X7M", "action": "RUN_ANALYTICS_JOB"}'
/api/license/heartbeat
Untuk lisensi bertipe durasi aktif (Active Usage Time), aplikasi client mengirim heartbeat berkala (misal tiap 60 detik) untuk menjaga validitas sesi dan memotong sisa waktu aktif.
curl -X POST "https://apilicense.my.id/public/api/license/heartbeat" \
-H "Content-Type: application/json" \
-d '{"token": "PS-PREM-8F2K9X7M"}'
/api/license/deactivate
Menutup sesi aktif perangkat secara rapi saat pengguna keluar dari software atau aplikasi ditutup.
curl -X POST "https://apilicense.my.id/public/api/license/deactivate" \
-H "Content-Type: application/json" \
-d '{"token": "PS-PREM-8F2K9X7M"}'
Standardized Error Responses
When an operation fails or a security threshold is violated, the API returns appropriate HTTP status codes with structured JSON error payloads:
{
"status": "limit_reached",
"valid": false,
"message": "License usage limit has been reached."
}
{
"status": "device_unauthorized",
"valid": false,
"message": "This license is bound to another hardware device fingerprint."
}
{
"status": "rate_limited",
"valid": false,
"message": "Too many requests. Please slow down."
}
Deteksi & Pengikatan Perangkat Otomatis
Anda tidak perlu lagi repot membuat algoritma fingerprint di aplikasi klien. Cukup kirimkan token, sistem server kami secara otomatis menangkap sinyal hardware (Platform, OS, IP, dan machine identifier), mengikatnya secara permanen ke lisensi, dan langsung menampilkannya pada dashboard admin website Anda.