ApinaAuth Documentation

Complete integration guide for secure software licensing with HWID binding, VPN detection, and file distribution.

Introduction

ApinaAuth is a comprehensive software licensing system that helps developers monetize their applications with advanced security features.

Ready to get started? Follow our quick start guide to integrate licensing into your application in minutes.

Key Features

  • HWID Binding - Prevent key sharing with automatic hardware fingerprinting
  • VPN Detection - Block users connecting through VPNs, proxies, or Tor
  • Multi-Language Support - SDKs for C++, C#, Python, JavaScript, Go, and PHP
  • Secure File Distribution - Host files with integrity verification
  • Real-time Analytics - Discord webhooks and comprehensive logging
  • Project Management - Organize multiple software products

Quick Start Guide

Get ApinaAuth integrated into your application in 3 simple steps.

Step 1: Create Your Project

Log into your dashboard and create a new project for your software.

Important: Change your default admin password immediately after first login.

Step 2: Generate License Keys

Create license keys with custom durations and settings:

Duration Use Case Example
Minutes Trial periods 30 minutes trial
Hours Short-term access 24 hours premium
Days Weekly subscriptions 7 days access
Months Monthly billing 1 month pro
Years Lifetime licenses 1 year unlimited

Step 3: Add Authentication

Integrate license verification into your application using our REST API or SDKs.

Authentication Flow

ApinaAuth uses multi-factor authentication to validate projects, license keys, hardware IDs, and software versions.

Required Parameters

Parameter Type Description
project string Your project identifier
key string Valid license key
hwid string Hardware identifier
version string Software version
HWID Binding: On first authentication, the hardware ID is automatically bound to the license key to prevent sharing.

API Endpoints

All endpoints use HTTP POST requests and return descriptive status codes.

License Verification

POST
/verify

Authenticate a user and verify their license is valid and properly bound.

Request Example
{ "project": "my-software", "key": "premium-abc123-def456", "hwid": "DESKTOP-ABC123", "version": "1.0.0" }
Success Response (200)
Key valid

Common Error Responses

Status Response Meaning
403 Invalid key License key not found
403 Key expired License has expired
403 Invalid HWID Hardware ID mismatch
403 Version mismatch Software version incorrect
403 VPN usage is not allowed User blocked for VPN usage

Check License Time

POST
/check-license-time

Get detailed information about license expiration and remaining time.

Success Response (200)
{ "status": "valid", "expiryTimestamp": 1672531200000, "expiryDate": "2023-01-01T00:00:00.000Z", "timeRemaining": 2592000000, "daysRemaining": 30, "hoursRemaining": 720, "minutesRemaining": 43200 }

File Download

POST
/download/:fileId

Download files securely after license verification. Files are protected and only accessible to authenticated users.

File Integrity: All files are protected with SHA256 hashing to ensure integrity and detect tampering.

C++ Integration

Simple and lightweight integration for C++ applications.

Basic Example
#include "apina.hpp" #include <iostream> int main() { apina::set_application("my-software"); try { apina::authenticate("premium-abc123-def456", "DESKTOP-ABC123"); std::cout << "✅ Authentication successful!" << std::endl; // Your protected code here } catch (const std::runtime_error& e) { std::cerr << "❌ Authentication failed: " << e.what() << std::endl; return 1; } return 0; }

C# Integration

Full async support for .NET applications with comprehensive error handling.

Basic Example
using System; using System.Threading.Tasks; using ApinaAuth; class Program { static async Task Main(string[] args) { var client = new ApinaAuthClient("my-software", "1.0.0"); try { var result = await client.AuthenticateAsync( "premium-abc123-def456", Environment.MachineName ); if (result.Success) { Console.WriteLine("✅ Authentication successful!"); // Your protected application code RunApplication(); } } catch (ApinaAuthException ex) { Console.WriteLine($"❌ License error: {ex.Message}"); Environment.Exit(1); } } static void RunApplication() { Console.WriteLine("🚀 Application running..."); } }

Python Integration

Clean and pythonic integration with automatic HWID detection.

Basic Example
import apinaauth import platform def main(): client = apinaauth.Client("my-software", "1.0.0") hwid = platform.node() # Use computer name as HWID try: result = client.verify_license("premium-abc123-def456", hwid) print("✅ Authentication successful!") # Your protected application code run_application() except apinaauth.AuthenticationError as e: print(f"❌ Authentication failed: {e}") return False def run_application(): print("🚀 Application running...") if __name__ == "__main__": main()

HWID Binding

Hardware ID binding prevents license key sharing by tying each license to a specific device.

How It Works

  1. First Use: User provides license key and hardware ID
  2. Automatic Binding: HWID is permanently bound to the license
  3. Future Access: Only the bound HWID can use the license
  4. Admin Control: Administrators can reset bindings when needed
Best Practice: Generate unique HWIDs using system information like CPU ID, motherboard serial, or MAC address.

VPN Detection

Automatically detect and block users connecting through VPNs, proxies, or Tor networks.

Detection Methods

  • VPN Services: Commercial VPN providers
  • Proxy Servers: HTTP/HTTPS/SOCKS proxies
  • Tor Network: Tor exit nodes
  • Anonymous Relays: Other relay networks
Configuration: VPN blocking can be enabled/disabled per project through your admin dashboard.

File Distribution

Host and distribute files securely to licensed users with integrity verification.

Security Features

  • Access Control: Only authenticated users can download files
  • SHA256 Integrity: All files protected with cryptographic hashing
  • Secure Storage: Files stored with UUID identifiers
  • Original Names: Files served with their original filenames
How it Works: Upload files through your dashboard, then distribute the file IDs to your users. They can download files using the secure API after license verification.