Documentation

Warden API reference

Everything you need to protect and sell your software with Warden: step-by-step guides for each feature, the SDKs, and the full API for loaders, bots and storefronts.

Quickstart

Your app's Overview has the same checklist and ticks steps off as you go.

  1. Create an application in the dashboard. A default subscription at level 1 is made for you.
  2. Generate a license key on the Licenses page. Keys are what your customers enter.
  3. Upload your program on the Files page. Only signed-in customers can download it.
  4. Build your loader on the Loader page and download it, with no coding, or add an SDK to your own program: open Add Warden to your project on the Overview for a snippet already filled in with your app's credentials.
  5. Sign in with a key. The first sign-in creates the user and locks the key to that PC.
  6. Optionally, share your customer portal so customers can check their time, reset their PC and add keys themselves.

Guides

SDKs

Pick your language for its install command, a quickstart, a complete example project and the full API. Packages are served by this Warden site, so there's no account or registry to set up, and most SDKs have no dependencies at all. Every install URL includes the version, and released versions never change, so pinned installs keep working (see the changelog).

The application ID and public key are safe to ship in your binary. The public key only lets the SDK verify responses. Never put your seller key in client code.

Protocol

All client calls are POST /api/v1 with a JSON or form body. Every request includes type, app_id and a random nonce. After init, pass the returned sessionid with every call.

POST /api/v1
Content-Type: application/json

{ "type": "license", "app_id": "…", "sessionid": "…", "key": "WARDEN-…", "hwid": "…", "nonce": "3f9a…" }

200 OK
x-warden-timestamp: 1767225600
x-warden-signature: 8c1f…

{ "success": true, "message": "Logged in.", "info": { "username": "…", "subscriptions": [ … ] }, "nonce": "3f9a…" }

Failed checks still return HTTP 200 with success: false and a human-readable message. Clients are limited to 120 requests per minute per IP, and auth attempts to 15 per minute.

Verifying responses

Each application has its own Ed25519 keypair. The server signs timestamp + "." + body and returns the hex signature in x-warden-signature. A client should accept a response only if:

  • the signature verifies against your app's public key,
  • the timestamp is within 5 minutes of the local clock, and
  • the nonce in the body matches the one you sent.

The official SDKs do all three for you. Responses to unknown apps are unsigned and must be treated as failures.

Client API

session means a valid sessionid is needed; login means the session must also be authenticated.

typeParametersRequiresDescription
initver, hash?, hwid?—Start a session. Checks version, file hash, pause state and blacklist.→ sessionid, appinfo
loginusername, pass, hwidsessionAuthenticate with a username and password. Binds the HWID on first login.→ info
registerusername, pass, key, hwid, email?sessionCreate an account by redeeming a license key, then log in.→ info
licensekey, hwidsessionKey-only login. The first use registers a user named after the key and locks the key to that machine's HWID.→ info
upgradeusername, keysessionRedeem another key on an existing account to add or extend subscriptions.
check—sessionReturns success if the session is still authenticated.
checkblacklisthwid?—success = true if the caller's IP or HWID is blacklisted.
varvaridsessionFetch a global variable. Variables can require a logged-in session.→ value
getvarvarloginRead a per-user variable.→ response
setvarvar, dataloginWrite a per-user variable, unless the seller marked it read-only.
filefileid, meta?sessionDownload a file into memory. Files over 10 MB return a 60-second signed URL. meta=1 returns the details only. The sha256 is in the signed response.→ name, size, sha256, version, release, notes, cachekey, contents (base64) | url
ticketfileid?loginA one-time launch ticket: valid for 2 minutes, once, on this machine. Pass it to a program you start.→ ticket, expires
redeemticket, hwidsessionLog this session in with a launch ticket. Lets a program refuse to run unless a signed-in loader started it.→ info
webhookwebid, params?, body?, conttype?sessionProxy a request to a seller-configured URL. The client can append a path or query.→ response
logmessage, pcuser?sessionSend a log line to the dashboard.
banreason?loginBan the current user and blacklist their HWID and IP, e.g. after detecting a debugger.
tamperkind, detail?, hwidsessionReport tampering: kind is debugger, tool, hook or modified. Warden counts strikes per PC and account and answers continue, refuse or banned, following the app's tamper setting (Loader page).→ action, message
fetchonline—sessionList usernames with an authenticated session.→ users[]
fetchstats—sessionUser, online and key counts plus the current version.→ appinfo
chatgetchannelloginThe last 50 messages in a channel.→ messages[]
chatsendchannel, messageloginPost to a channel, subject to its slow mode.
logout—sessionEnd the session.

Seller API

Automate your app from a Discord bot or storefront. Send your seller key as Authorization: Bearer <key> (or sellerkey=) to GET|POST /api/seller with a type.

curl -X POST https://your-warden.vercel.app/api/seller \
  -H "Authorization: Bearer $WARDEN_SELLER_KEY" \
  -d type=add -d amount=5 -d level=1 -d expiry=30
typeParametersDescription
addamount, level, expiry (days), mask?, note?Generate license keys
verify / infokeyCheck a key's status and who used it
del / ban / unbankey, reason?, userToo?Manage a single key. Deleting a key a reseller bought needs a reason, which the reseller sees.
fetchallkeys / fetchallusers—Export keys or users
deluser / banuser / unbanuseruser, reason?Manage a user
resetuseruserReset a user's HWID (and their keys)
resetkeykeyUnlock a key from its machine
extenduser, sub, expiry (days)Add time to a subscription
extendallexpiry (days)Add time to every user
setvar / setuservarvar, data, user?, authed?, readonly?Write global or per-user variables
fetchsubs—List subscriptions
blacklistblacktype (ip|hwid), data, reason?Add a blacklist entry
stats—User, online and key counts
pause / unpause—Toggle the application

Discord bot

A ready-made bot for your Discord server, built on the Seller API. Admins run slash commands, and every reply is private to whoever ran it, so keys and customer details never appear in the channel.

  • /genkeyGenerate keys (amount, days, level, note)
  • /keyinfoStatus, who redeemed it, machine lock
  • /ban · /unbanBan or unban a key, optionally its account
  • /resetkeyUnlock a key from its machine
  • /statsUsers, online users and keys

Download it, fill in .env with your bot token and your app's seller key, then npm install, npm run register and npm start. The README walks through creating the bot in Discord. Run it on a machine you control: the seller key can create and delete keys.

Download the Discord bot

Keys & subscriptions

A license key has a level and a duration. Redeeming it grants every subscription at that level. If the user already holds the subscription, the time is added to the current expiry, so keys stack.

With HWID lock on (the default), a key is bound to the HWID of the machine that first redeems it, and so is the account it creates. The same key on a different machine is refused and logged. Requests without a HWID are rejected, so a modified loader can't skip the check. Reset a key from the Licenses page or with the seller API's resetkey.

Masks use * for a random character (no ambiguous 0/O/1/I), # for a digit and X for an uppercase letter. Everything else is kept as-is, e.g. WARDEN-*****-*****-*****. Put \ before any character to keep it as typed: WARDEN-V\XPZR-***** gives keys like WARDEN-VXPZR-7K2QM. A mask with no random characters is a fixed key and is generated one at a time.