License Server API
Welcome to the License Server API documentation! This comprehensive guide will help you integrate license management into your applications.
What is the License Server?
The License Server is a robust API for managing software licenses with enterprise-grade security and features:
- 🔐 Secure License Generation - Base58-encoded keys with 160-bit entropy
- 🛡️ Admin Protection - Bearer token authentication for administrative operations
- ⚡ Smart Rate Limiting - Different limits for different endpoint categories
- 🔍 Real-time Verification - Instant license validation and activation tracking
- 📊 Usage Analytics - Monitor license usage patterns and generate reports
- 🎯 Attack Protection - Timing-safe responses prevent information leakage
Quick Start
1. Health Check
First, let's verify the API is running:
bash
curl https://your-license-api.com/Response:
json
{
"message": "License API is running",
"version": "1.0.0"
}2. Verify a License
Check if a license key is valid:
bash
curl -X POST https://your-license-api.com/v1/verify-license \
-H "Content-Type: application/json" \
-d '{
"key": "7yChyZcfMG23Dx1sjBoLziPFrH4n-6f28"
}'3. Activate a License
Activate a license for a specific instance:
bash
curl -X POST https://your-license-api.com/v1/activate-license \
-H "Content-Type: application/json" \
-d '{
"key": "7yChyZcfMG23Dx1sjBoLziPFrH4n-6f28",
"instance_id": "server-001"
}'Key Features
🔑 Secure Key Generation
The new license key format provides enhanced security:
- Old Format (UUID):
a1b2c3d4-e5f6-4789-9012-345678abcdef - New Format (Base58):
7yChyZcfMG23Dx1sjBoLziPFrH4n-6f28
New Key Format Benefits
- 160-bit entropy vs UUID's 122-bit
- No confusing characters (0, O, I, l excluded)
- Shorter length for better usability
- Metadata encoding for quick validation
⚡ Rate Limiting
Smart rate limits protect the API while allowing legitimate usage:
| Category | Rate Limit | Endpoints |
|---|---|---|
| Validation 1000/15min | High frequency | /verify-license, /validate-license |
| Activation 300/15min | Moderate | /activate-license, /verify-license-file |
| Public 200/15min | Standard | /export-license, /list-activations |
| Admin 100/15min | Protected | /issue-license, /revoke-license |
🛡️ Authentication
Two levels of access control:
- Public Endpoints - No authentication required
- Admin Endpoints (Require Bearer token)
API Categories
License Validation
High-frequency endpoints for real-time license verification:
- Verify license validity
- Validate license for specific instances
- Check license status and limits
License Activation
Moderate-frequency endpoints for license activation:
- Activate licenses for instances
- Verify license files
- Track activation history
Usage Tracking
Monitor and report license usage:
- Track usage metrics
- Generate usage reports
- Monitor license compliance
Admin Operations
Administrative endpoints for license management:
- Issue new licenses
- Revoke/reactivate licenses
- Delete licenses
- View statistics and reports
Next Steps
Documentation Sections
- Installation & Setup - Get started with deployment
- Authentication - Configure API keys and security
- Rate Limits - Understand request quotas
- Issuing Licenses - Create and manage licenses
- Integration Guide - Implement license verification
- API Reference - Complete endpoint documentation
- Error Handling - Robust error management
Need Help?
- 📚 Check out the Integration Guide for detailed examples
- 🔍 Browse the API Reference for complete endpoint documentation
- 🐛 Report issues on GitHub
- 💬 Ask questions on Stack Overflow