Getting Started
Set up Authon in your application in under 5 minutes. This guide covers creating your first app, generating license keys, and authenticating users.
Prerequisites
- An Authon account (sign up free)
- An application created in the dashboard
- Your App ID and API Key (found in app settings)
Step 1: Create an Application
After signing in to the dashboard, click "Create Application" and give it a name. You'll immediately receive an App ID and API Key.
App ID
94c39ce0-b3d3-481a-b2ac-4eae5fba888dAPI Key
as_5778493b3fcc4cb59077a4d240beec0dStep 2: Initialize Your Application
Before any authentication call, initialize your app by sending a request with type: "init". This validates your credentials and checks if the app is active.
curl -X POST https://api.authon.pro/v1 \
-H "Content-Type: application/json" \
-d '{
"type": "init",
"appId": "your-app-id",
"apiKey": "your-api-key"
}'{
"success": true,
"message": "App initialized",
"data": {
"name": "My Application",
"version": "1.0.0",
"updateUrl": null
}
}Step 3: Generate License Keys
Go to the Licenses section of your app in the dashboard, or use the Admin API to generate keys programmatically.
curl -X POST https://api.authon.pro/v1/admin/apps/YOUR_APP_ID/licenses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"count": 5,
"durationType": "30d",
"level": 1,
"maxDevices": 1
}'Duration Types
Supported values: 1h, 1d, 7d, 30d, 90d, 365d, lifetime
Step 4: Authenticate Users
Users can authenticate in three ways: username/password login, registration with a license key, or license-only authentication.
Option A: Register with License Key
curl -X POST https://api.authon.pro/v1 \
-H "Content-Type: application/json" \
-d '{
"type": "register",
"appId": "your-app-id",
"apiKey": "your-api-key",
"username": "newuser",
"password": "securepass123",
"licenseKey": "XXXX-XXXX-XXXX-XXXX",
"hwid": "HWID-A1B2C3D4"
}'Option B: Login
curl -X POST https://api.authon.pro/v1 \
-H "Content-Type: application/json" \
-d '{
"type": "login",
"appId": "your-app-id",
"apiKey": "your-api-key",
"username": "existinguser",
"password": "securepass123",
"hwid": "HWID-A1B2C3D4"
}'Option C: License-Only Auth
curl -X POST https://api.authon.pro/v1 \
-H "Content-Type: application/json" \
-d '{
"type": "license",
"appId": "your-app-id",
"apiKey": "your-api-key",
"licenseKey": "XXXX-XXXX-XXXX-XXXX",
"hwid": "HWID-A1B2C3D4"
}'Step 5: Use Session Features
After login, you receive a sessionToken. Use it to access session-protected features like variables and file downloads.
curl -X POST https://api.authon.pro/v1 \
-H "Content-Type: application/json" \
-d '{
"type": "var",
"appId": "your-app-id",
"apiKey": "your-api-key",
"sessionToken": "your-session-token",
"key": "download_url"
}'