Reference

Client API

One endpoint, /api/1.0. Send parameters as form data, JSON, or query string with GET or POST. Pick the action with the type parameter. Every response is JSON with success and message.

Flow

  1. 01

    Call init with your app name, owner ID and version to get a session ID.

  2. 02

    Call login, register or license with that session.

  3. 03

    Use the session for variables, logs and checks.

Request types

  • type=init

    name, ownerid, ver

    Starts a session (valid 1 hour). Returns sessionid. If ver differs from the app version, returns success=false with a download link.

  • type=register

    sessionid, username, pass, key, hwid

    Creates a user by redeeming an unused license key. Duration and level come from the key.

  • type=login

    sessionid, username, pass, hwid

    Logs a user in. Checks ban, expiry, blacklist and HWID lock.

  • type=license

    sessionid, key, hwid

    License-only login. First use redeems the key and creates a user named after the key.

  • type=upgrade

    sessionid, username, key

    Redeems another key to extend an existing user. Level becomes the higher of the two.

  • type=var

    sessionid, varid

    Returns a server variable in message. Auth-only variables require a logged-in session.

  • type=log

    sessionid, message, pcuser

    Writes a custom log line to your dashboard.

  • type=check

    sessionid

    success=true when the session has a logged-in user.

  • type=ban

    sessionid, hwid, reason

    Bans the logged-in user and blacklists their HWID. Use when your app detects tampering.

  • type=fetchStats

    sessionid

    Returns total users, users online in the last hour, and current version.

  • type=logout

    sessionid

    Ends the session.

Verifying responses

Responses for a known app include a signature header: HMAC-SHA256 of the raw response body, keyed with your app's secret. Recompute it on the client and reject mismatches to block fake auth servers.

verify.py
import hmac, hashlib

expected = hmac.new(SECRET.encode(), res.content, hashlib.sha256).hexdigest()
if not hmac.compare_digest(expected, res.headers["signature"]):
    raise SystemExit("Response was tampered with")