Skip to main content
This guide shows how to bind licenses to an external identity (Telegram/Discord user ID, account ID, etc.) by setting SDK HWID override fields.

When to use this

Use HWID override when device fingerprinting is the wrong abstraction:
  • bot users
  • web users
  • cloud workers
  • multi-tenant service identities
For desktop apps, use default machine HWID behavior.

Flow

  1. User requests access in your app/bot.
  2. Prompt for a license key.
  3. Build a stable identity string (for example tg:123456789).
  4. Initialize SDK with HWID override set to that identity.
  5. Call validateLicense() / validate_license / ValidateLicense (or login() if you want a long-lived session and heartbeats).
  6. Allow features only after success.
Prefer validate-license APIs for stateless or per-request checks (API gateways, bots, cron): they run the same /auth/validate flow and signature verification as login without starting heartbeat threads or timers.

Identity format and rules

  • Include a provider prefix (tg:, discord:, user:).
  • Use immutable IDs (platform numeric user IDs), not usernames.
  • Keep values under AuthForge limits (short strings are best).

SDK examples

Node

Python

Go

C#

Rust

C++

Operational tips

  • Set sensible maxHwidSlots for your use case (often 1 for user-bound bots).
  • Provide a support flow to reset bindings when users migrate accounts.
  • If abuse is expected, combine with IP/HWID security lists and command rate limits.