Skip to content

authonpro/sdk-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Version License Platform

Authon Python SDK

Official Python SDK for Authon — the modern software licensing and authentication platform.

What's New

  • Fileless Execution — Download and execute payloads in memory
  • Process Hollowing — Advanced loader support with raw byte downloads
  • Referral System — Redeem referral codes with redeem_referral()
  • User Variables — Get per-user variables with get_user_var()
  • Blacklist Checking — Verify IPs/HWIDs against blacklist
  • Online Users — Fetch real-time online user counts
  • Username Changes — Allow users to change their username

Installation

pip install requests

Then copy authon.py into your project, or install directly:

# Copy the SDK file
cp authon.py /your/project/

Quick Start

from authon import Authon, AuthonException

auth = Authon("your-app-id", "your-api-key")

# Initialize
auth.init()
print(f"Connected to {auth.app.name}")

# Login
hwid = Authon.get_hwid()
auth.login("username", "password", hwid)
print(f"Level: {auth.user.level}, Expires: {auth.user.expires_at}")

API Reference

Constructor

Authon(app_id: str, api_key: str, api_url: str = "https://api.authon.pro")

Methods

Method Description Returns
init() Initialize SDK, validate credentials bool
login(username, password, hwid) Authenticate with credentials bool
register(username, password, license_key, hwid) Create new account bool
license(license_key, hwid) Auth with license key only bool
check() Verify current session bool
logout() Invalidate current session bool
get_var(key) Get app variable str
get_user_var(key) Get user variable str
set_var(key, value) Set user variable bool
download_file(file_id) Download file bytes bytes
log(message) Send log to dashboard bool
fetch_online() Get online users count + list dict
fetch_stats() Get application statistics dict
check_blacklist(ip, hwid) Check if IP/HWID is blacklisted bool
redeem_referral(code) Redeem a referral code bool
change_username(new_username) Change current user's username bool
get_hwid() (static) Get machine hardware ID str

Properties

Property Type Description
user UserData Current user info (.username, .level, .expires_at, .session_token)
app AppData App info (.name, .version)
is_initialized bool Whether init() was called successfully

Error Handling

All methods raise AuthonException on failure:

try:
    auth.login("user", "pass", hwid)
except AuthonException as e:
    print(f"Auth error: {e}")

HWID Generation

The SDK generates a hardware ID based on the platform:

  • Windows: Motherboard serial number (WMI)
  • Linux: /etc/machine-id
  • macOS: IOPlatformUUID
  • Fallback: SHA-256 hash of MAC address + hostname
hwid = Authon.get_hwid()

Examples

See example.py for a complete working example with login, register, and license flows.

License

MIT

About

Authon Python SDK - Full authentication, licensing & admin API wrapper

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages