Official Go SDK for Authon — the modern software licensing and authentication platform.
- Fileless Execution — Download and execute payloads in memory
- Process Hollowing — Advanced loader support with raw byte downloads
- Referral System — Redeem referral codes with
RedeemReferral() - User Variables — Get per-user variables with
GetUserVar() - Blacklist Checking — Verify IPs/HWIDs against blacklist
- Online Users — Fetch real-time online user counts
- Username Changes — Allow users to change their username
go get github.com/authon/sdk-goOr copy the authon package into your project:
cp -r authon/ /your/project/package main
import (
"fmt"
"authon-sdk/authon"
)
func main() {
auth := authon.New("your-app-id", "your-api-key")
// Initialize
if err := auth.Init(); err != nil {
panic(err)
}
fmt.Printf("Connected to %s\n", auth.App.Name)
// Login
hwid := authon.GetHWID()
if err := auth.Login("username", "password", hwid); err != nil {
panic(err)
}
fmt.Printf("Level: %d, Expires: %s\n", auth.User.Level, auth.User.ExpiresAt)
}authon.New(appID string, apiKey string, apiURL ...string) *AuthonDefault API URL: https://api.authon.pro
| Method | Description | Returns |
|---|---|---|
Init() |
Initialize SDK, validate credentials | error |
Login(username, password, hwid) |
Authenticate with credentials | error |
Register(username, password, licenseKey, hwid) |
Create new account | error |
License(licenseKey, hwid) |
Auth with license key only | error |
Check() |
Verify current session | (bool, error) |
Logout() |
Invalidate current session | error |
GetVar(key) |
Get app variable | (string, error) |
GetUserVar(key) |
Get user variable | (string, error) |
SetVar(key, value) |
Set user variable | error |
DownloadFile(fileID) |
Download file bytes | ([]byte, error) |
Log(message) |
Send log to dashboard | error |
FetchOnline() |
Get online users count + list | (*OnlineData, error) |
FetchStats() |
Get application statistics | (apiResponse, error) |
CheckBlacklist(ip, hwid) |
Check if IP/HWID is blacklisted | (bool, error) |
RedeemReferral(code) |
Redeem a referral code | error |
ChangeUsername(newUsername) |
Change current user's username | error |
GetHWID() (package func) |
Get machine hardware ID | string |
| Field | Type | Description |
|---|---|---|
User |
UserData |
Current user (Username, Level, ExpiresAt, SessionToken) |
App |
AppData |
App info (Name, Version) |
Initialized |
bool |
Whether Init() was called successfully |
All methods return an error on failure:
if err := auth.Login("user", "pass", hwid); err != nil {
fmt.Printf("Auth error: %v\n", err)
}The SDK generates a hardware ID based on the platform:
- Windows: Motherboard serial number (WMIC)
- Linux:
/etc/machine-id - macOS: IOPlatformUUID
- Fallback: SHA-256 hash of hostname + OS info
hwid := authon.GetHWID()See main.go for a complete working example with login, register, and license flows.
MIT