License Key Integration Documentation

This guide is for developers integrating our License Key system into their software or website.


1. Core Principle & Real-time Control

Your application's functionality must rely entirely on the API verification status. If the license is deactivated by the Admin, the app must **immediately cease operation** upon the next status check.

2. API Endpoints

Base URL: https://license.sunnytech.top/api/v1/license


A. POST /verify (Initial Activation)

Used to perform initial verification and register the unique domain/app ID with the license key.

Parameter Type Required Description
license_key string Yes The user's unique license key.
domain_or_app_id string Yes The unique ID of the website (e.g., example.com) or software installation.

Success Response (Status: active):

{
    "status": "active",
    "message": "License is valid and active.",
    "data": {
        "expires_at": "YYYY-MM-DD HH:MM:SS",
        "check_in_interval": 3600 // Check again every 3600 seconds (1 hour)
    }
}

B. GET /status/{key}/{id} (Heartbeat Check)

Must be called regularly (every check_in_interval seconds) to check real-time status.

Failure Response (Status: inactive):

{
    "status": "inactive",
    "message": "License key is invalid, expired, or deactivated.",
    "code": "LICENSE_INACTIVE"
}

3. Lockdown Requirement

If the API returns "inactive" for any reason, the software or website must immediately halt all functions (Lockdown) and prompt the user to contact support or purchase a new license. There are no grace periods for manual deactivation.