License API

Live

A ready-to-use subscription licensing service. Bind licenses to devices via HWID, verify status, and manage subscribers from a single admin panel.

How it works

01

Login

The client sends username, password, and a device HWID to /api/login.

02

Bind

The first login binds the HWID. Later logins must use the same device.

03

Check

The client calls /api/check with its token to verify remaining rental time.

Quick start

  1. 1Create a subscriber in the admin panel

    Go to /admin, sign in with your admin password, and add a user with a license duration.

  2. 2Download the Python client

    The client extracts a stable HWID, logs in, and checks license status.

    /client/license_client.pyDownload
    pip install requests
    python license_client.py
  3. 3Or call the API directly with curl
    curl -X POST /api/login \
      -H "content-type: application/json" \
      -d '{"username":"your-user","password":"your-pass","hwid":"your-hwid"}'

API endpoints

POST/api/login
{ "username": "demo", "password": "demo", "hwid": "..." }
{ "success": true, "token": "...", "remaining_ms": 259200000 }
POST/api/check
{ "token": "...", "hwid": "..." }
{ "success": true, "active": true, "remaining_ms": 259200000 }
GET/api/admin/users
Authorization: Bearer <admin-password>
{ "success": true, "users": [...] }

Environment variables

TURSO_DATABASE_URL
libsql://...
TURSO_AUTH_TOKEN
...
ADMIN_PASSWORD
change-me-in-production
LICENSE_PEPPER
random-secret-pepper