API Documentation
Complete reference for the Licence Server Public API.
GET
/api/check
Validates a licence key and returns associated details and files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | The licence key to validate. |
| host | string | No | Client hostname (auto-detected if omitted). |
| user | string | No | User identifier. |
Response
{
"valid": true,
"licence": {
"id": "uuid...",
"key": "XXXX-XXXX",
"isActive": true,
"user": "User Name",
"files": [
{
"id": "file-uuid...",
"name": "plugin.zip",
"version": "1.0.0"
}
]
}
}Example Request
curl "http://localhost:3000/api/check?key=YOUR-KEY&host=example.com"GET
/api/serve/[fileId]
Downloads a file associated with a valid licence.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| fileId | path | Yes | UUID of the file to download. |
| key | query | Yes | Valid licence key. |
Response
Binary file streamExample Request
curl -O -J "http://localhost:3000/api/serve/FILE-UUID?key=YOUR-KEY"POST
/api/auth/login
Authenticates a user and sets a session cookie.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| username | body | Yes | User email or username. |
| password | body | Yes | User password. |
Response
{
"success": true,
"user": {
"id": "uuid...",
"username": "admin"
}
}Example Request
curl -X POST http://localhost:3000/api/auth/login \
-H "Content-Type: application/json" \
-d '{"username":"admin","password":"password"}'POST
/api/auth/logout
Clears the session cookie.
Response
{ "success": true }Example Request
curl -X POST http://localhost:3000/api/auth/logout