Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Authon

Authon Python SDK

Official Python SDK for Authon β€” Software Licensing & Authentication Platform

Website Discord Status Python License


πŸš€ Quick Start

1. Install

pip install requests

2. Get Your Credentials

  1. Create an account at authon.pro
  2. Go to Dashboard β†’ Apps β†’ Create Application
  3. Copy your App ID and API Key from App Settings

3. Use

from authon import Authon

# Initialize with your credentials
auth = Authon("your-app-id", "your-api-key")
auth.init()

# Authenticate
result = auth.login("username", "password")
if result["success"]:
    print(f"Welcome {auth.username}! Level: {auth.level}")
    print(f"Expires: {auth.expires_at}")
else:
    print(f"Error: {result['message']}")

# Use features
value = auth.get_var("welcome_message")
files = auth.list_files()
auth.log("Application started")

# Logout when done
auth.logout()

πŸ“– API Reference

Initialization

Method Description
Authon(app_id, api_key) Create SDK instance
init() β†’ bool Connect to API, validate credentials

Authentication

Method Description
login(username, password, hwid?) β†’ dict Login with credentials
license(key, hwid?) β†’ dict Authenticate with license key
register(username, password, license_key, hwid?) β†’ dict Create new account
check() β†’ bool Validate session (heartbeat)
logout() β†’ bool End session

Variables

Method Description
get_var(key) β†’ str Get app-level variable
set_var(key, value) β†’ bool Set user-level variable
get_user_var(key) β†’ str Get user-level variable

Files

Method Description
list_files() β†’ list List available files for user's level
download_file(file_id) β†’ bytes Download file content

Stats & Logging

Method Description
log(message) β†’ bool Send activity log
fetch_online() β†’ dict Get online user count/list
fetch_stats() β†’ dict Get app statistics

Utility

Method Description
get_hwid() β†’ str Generate hardware ID
check_blacklist(ip?, hwid?) β†’ dict Check ban status
redeem_referral(code) β†’ dict Redeem referral code

Properties

Property Type Description
session_token str Active session token
username str Authenticated username
level int User access level
subscription str Subscription plan name
expires_at str Subscription expiry date
app_name str Application name
app_version str Application version
is_authenticated bool Whether user has active session

πŸ” Authentication Methods

Username + Password Login

result = auth.login("username", "password")
if result["success"]:
    # auth.session_token, auth.username, auth.level are now set
    print(f"Level: {auth.level}")

License Key Only

result = auth.license("ABCDE-FGHIJ-KLMNO-PQRST")
if result["success"]:
    print(f"License valid! Level: {auth.level}")

Register New Account

result = auth.register("newuser", "password123", "LICENSE-KEY-HERE")
if result["success"]:
    print("Account created! Now login:")
    auth.login("newuser", "password123")

πŸ“ File Downloads

# List available files
files = auth.list_files()
for f in files:
    print(f"  {f['name']} ({f['size']} bytes) β€” Level {f['minLevel']}")

# Download a file
data = auth.download_file(files[0]["id"])
if data:
    with open(files[0]["name"], "wb") as f:
        f.write(data)
    print(f"Downloaded {len(data)} bytes")

πŸ–₯️ HWID (Hardware ID)

HWID is automatically generated from your system hardware. You don't need to handle it manually.

  • Windows: Disk serial number + computer name
  • macOS: Hardware UUID
  • Linux: /etc/machine-id

To override:

result = auth.login("user", "pass", hwid="custom-hwid-value")

⚠️ Error Handling

result = auth.login("user", "wrongpassword")
if not result["success"]:
    error = result["message"]
    # Possible error messages:
    # - "Invalid credentials"
    # - "Account banned"
    # - "Hardware ID mismatch"
    # - "Subscription expired"
    # - "Account is frozen. Contact admin to unfreeze."
    # - "VPN/Proxy connections are not allowed"
    # - "Application is paused"
    # - "IP address banned"
    print(f"Error: {error}")

πŸ—οΈ Project Structure

python-Loader/
β”œβ”€β”€ authon.py           # SDK source (single file, copy to your project)
β”œβ”€β”€ example.py          # Full usage example
β”œβ”€β”€ requirements.txt    # Dependencies (just 'requests')
β”œβ”€β”€ pyproject.toml      # Package metadata
└── README.md           # This file

πŸ”— Links

Resource URL
🌐 Website https://authon.pro
πŸ“– Documentation https://authon.pro/docs
πŸ’¬ Discord Community https://discord.gg/MTY79JDFm6
πŸ“Š Service Status https://authon.pro/status
πŸ”— API Health Check https://api.authon.pro/health
πŸ™ GitHub https://github.com/authonpro

πŸ“‹ Requirements

  • Python 3.8+
  • requests library (pip install requests)

πŸ“„ License

MIT β€” Free to use in any project, commercial or personal.


Built with ❀️ by Authon
The #1 KeyAuth Alternative

About

Authon Python SDK - Full authentication, licensing & file download for Python apps

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages