The official Python client library for AuthVaultix β a powerful license & authentication management platform.
- What is AuthVaultix?
- Features
- Requirements
- Installation
- Quick Start
- Full Example (main.py)
- API Reference
- HWID Detection
- User Data Structure
- Error Handling
- License
AuthVaultix is a cloud-based software licensing and user authentication system. This Python SDK allows your application to seamlessly connect to the AuthVaultix API to:
- Authenticate users via login, registration, or license key
- Protect your software with hardware-locked licensing (HWID)
- Retrieve user subscriptions, metadata, and custom variables
- Prevent unauthorized access and piracy
| Feature | Description |
|---|---|
| π Login / Register | Authenticate users with username & password |
| πͺͺ License Key Auth | Allow access via license key only |
| π₯οΈ HWID Locking | Hardware fingerprinting on Windows, Linux & macOS |
| π¦ Subscription Info | Retrieve active subscriptions with expiry & time left |
| π’ Custom Variables | Get/Set server-side variables per user |
| πͺ Secure Logout | Invalidate session server-side |
| β‘ Session Management | Auto session-ID handling on init |
- Python 3.7+
requestslibrary
Install dependencies:
pip install requestsOption 1: Clone the repository
git clone https://github.com/AuthVaultix-Python-Example.git
cd authvaultix-python
pip install requestsOption 2: Download manually
Download authvaultix.py and place it in your project directory.
from authvaultix import AuthVaultixClient
# Initialize the client
client = AuthVaultixClient(
app_name="MyApp",
owner_id="your_owner_id_here",
secret="your_secret_key_here", # Must be 64+ characters
version="1.0",
api_url="https://authvaultix.com/api/1.0/"
)
# Login
success = client.login("myusername", "mypassword")
if success:
info = client.get_user_info()
print("Welcome,", info["username"])
print("Subscription expires:", info["subscriptions"][0]["expiry"])The included main.py demonstrates a complete authentication flow with a console menu:
from authvaultix import AuthVaultixClient
AuthVaultixapp = AuthVaultixClient(
app_name="", # Your app name from dashboard
owner_id="", # Your Owner ID from dashboard
secret="", # Your Secret key (64+ chars)
version="1.0",
api_url="https://authvaultix.com/api/1.0/"
)
# 1. Login
AuthVaultixapp.login("username", "password")
# 2. Register
AuthVaultixapp.register("username", "password", "LICENSE-KEY-HERE", "email@example.com")
# 3. License key only
AuthVaultixapp.license_login("LICENSE-KEY-HERE")
# Get user info after auth
info = AuthVaultixapp.get_user_info()
print("Username:", info["username"])
print("HWID:", info["hwid"])
print("IP:", info["ip"])
for sub in info["subscriptions"]:
print(f"Sub: {sub['name']} | Expires: {sub['expiry']} | Left: {sub['timeleft']}")Initializes and connects your app to the AuthVaultix server.
| Parameter | Type | Description |
|---|---|---|
app_name |
str |
Your application name |
owner_id |
str |
Owner ID from dashboard (min 10 chars) |
secret |
str |
Secret key from dashboard (min 64 chars) |
version |
str |
Your app version (e.g. "1.0") |
api_url |
str |
API endpoint URL |
Authenticates a user with username and password. Returns True on success.
Registers a new user using a license key and optional email. Returns True on success.
Authenticates a user using a license key only (no username/password). Returns True on success.
Logs the user out and invalidates the current session.
Returns a dictionary with the authenticated user's information.
Validates if the current session is still active. Returns True if valid.
Upgrades a user's account/subscription with a new license key.
Triggers a password reset email for the given user.
Changes the authenticated user's username.
Fetches a user-specific server-side variable.
Sets a user-specific server-side variable for the current user.
Fetches a global server-side variable by its ID.
Downloads a secure file from the server. Returns the file's binary content.
Sends a log message to the AuthVaultix dashboard.
Retrieves a list of currently online clients.
Bans the currently authenticated user with an optional reason.
Checks if the current machine's HWID is blacklisted on the server. Returns True if blacklisted.
Fetches application statistics (users, active, etc.) into app_info.
Sends a message to a specific chat channel.
Retrieves chat history for a specific channel.
Triggers a custom webhook on the AuthVaultix server.
The SDK automatically generates a unique Hardware ID (HWID) for each machine and locks the license to it. It supports:
| Platform | Sources Used |
|---|---|
| Windows | CPU Processor ID + Disk Serial + Motherboard Serial + Machine GUID |
| Linux | /etc/machine-id + CPU Serial + Disk Serial |
| macOS | Hardware Serial Number |
The raw hardware data is hashed with SHA-256 and converted to a Windows SID-style format (e.g. S-1-5-21-XXXX-XXXX-XXXX-XXXX).
You can also get the HWID manually:
from authvaultix import HardwareIdentifier
hwid = HardwareIdentifier.fetch()
print("Your HWID:", hwid)After a successful login/register/license, get_user_info() returns:
{
"username": "john_doe",
"ip": "123.456.789.0",
"hwid": "S-1-5-21-XXXX-XXXX-XXXX-XXXX",
"created": "2024-01-15 10:30:00 AM",
"last_login": "2024-06-01 08:00:00 AM",
"expires": "2025-01-15 10:30:00 AM",
"subscriptions": [
{
"name": "premium",
"expiry": "2025-01-15 10:30:00 AM",
"timeleft": "215d 14h 30m"
}
]
}The SDK prints descriptive error messages to the console. Common errors:
| Error | Cause |
|---|---|
Invalid ownerid |
ownerid is missing or less than 10 characters |
Invalid secret |
secret is missing or less than 64 characters |
Invalid API URL |
api_url doesn't start with http |
Init failed |
App not found or version mismatch in dashboard |
Login failed |
Wrong credentials or HWID mismatch |
Request timed out |
Server is down or network issue |
π¦ authvaultix-python/
β£ π authvaultix.py β Core SDK (import this in your project)
β£ π main.py β Full usage example with console menu
β π README.md β You are here
This project is licensed under the MIT License β you are free to use, modify, and distribute it.
Made with β€οΈ for the AuthVaultix community