Quickstart
Get started with QuantumLockβ’ in 5 minutes.
Prerequisitesβ
- An email account for registration
- Terminal or command-line access
- Programming language of choice (Python, Node.js, Java, or C#)
Step 1: Register Accountβ
Register for a QuantumLock account using curl:
curl -X POST https://api.softquantus.com/api/v1/customers/register \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@company.com",
"company_name": "Your Company Inc",
"plan": "starter"
}'
Response:
{
"id": "cust_abc123xyz",
"email": "your-email@company.com",
"company_name": "Your Company Inc",
"api_key": "ql_a1b2c3d4e5f6...",
"plan": "starter",
"monthly_license_limit": 100,
"licenses_generated_this_month": 0,
"created_at": "2025-12-14T10:30:00Z"
}
β οΈ Save your API key! Store it securely - it won't be shown again.
Step 2: Generate a Licenseβ
Using API (curl)β
export QUANTUMLOCK_API_KEY="ql_a1b2c3d4e5f6..."
curl -X POST https://api.softquantus.com/api/v1/licenses/generate \
-H "Authorization: Bearer $QUANTUMLOCK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"end_customer_id": "test-customer-001",
"features": ["premium", "api_access"],
"expires_in_days": 365,
"metadata": {
"company": "Test Corp",
"plan": "professional"
}
}'
Response:
{
"license_key": "QCOS-ABCD-EFGH-IJKL-MNOP",
"customer_id": "cust_abc123xyz",
"end_customer_id": "test-customer-001",
"features": ["premium", "api_access"],
"issued_at": "2025-12-14T10:35:00Z",
"expires_at": "2026-12-14T10:35:00Z",
"quantum_signature": "q1:0.9876|q2:0.9823|q3:0.9901...",
"quantum_fidelity": 0.9986,
"generation_time_ms": 28,
"metadata": {
"company": "Test Corp",
"plan": "professional"
}
}
Using CLIβ
First, install the CLI:
pip install quantumlock-cli
Configure credentials:
quantumlock configure
# Enter API URL: https://api.softquantus.com
# Enter API Key: ql_a1b2c3d4e5f6...
Generate license:
quantumlock generate \
--customer "test-customer-001" \
--features "premium,api_access" \
--days 365 \
--metadata company="Test Corp" \
--metadata plan="professional"
Output:
β License generated successfully!
βββββββββββββββββββββ³βββββββββββββββββββββββββββββββ
β Field β Value β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββ©
β License Key β QCOS-ABCD-EFGH-IJKL-MNOP β
β Customer ID β test-customer-001 β
β Features β premium, api_access β
β Issued At β 2025-12-14T10:35:00Z β
β Expires At β 2026-12-14T10:35:00Z β
β Quantum Fidelity β 0.9986 β
β Generation Time β 28ms β
βββββββββββββββββββββ΄βββββββββββββββββββββββββββββββ
Step 3: Validate License in Your Appβ
Pythonβ
Install SDK:
pip install quantumlock-sdk
Integrate in your application:
from quantumlock_sdk import LicenseValidator, LicenseError
def main():
validator = LicenseValidator()
# Get license from config file or user input
license_key = "QCOS-ABCD-EFGH-IJKL-MNOP"
try:
# Validate license (offline, no internet needed)
license_data = validator.validate(license_key)
print(f"β License valid!")
print(f" Customer: {license_data['customer_id']}")
print(f" Features: {', '.join(license_data['features'])}")
print(f" Expires: {license_data['expires_at']}")
print(f" Days remaining: {license_data['days_remaining']}")
# Check specific features
if "premium" in license_data["features"]:
print(" β Premium features enabled")
enable_premium_features()
if "api_access" in license_data["features"]:
print(" β API access enabled")
enable_api_access()
# Start your application
run_application()
except LicenseError as e:
print(f"β License validation failed: {e}")
print(" Please contact support or purchase a license.")
sys.exit(1)
if __name__ == "__main__":
main()
Node.jsβ
Install SDK:
npm install @quantumlock/sdk
Integrate in your application:
const { LicenseValidator } = require('@quantumlock/sdk');
async function main() {
const validator = new LicenseValidator();
// Get license from config file or user input
const licenseKey = 'QCOS-ABCD-EFGH-IJKL-MNOP';
try {
// Validate license (offline, no internet needed)
const license = await validator.validate(licenseKey);
console.log('β License valid!');
console.log(` Customer: ${license.customerId}`);
console.log(` Features: ${license.features.join(', ')}`);
console.log(` Expires: ${license.expiresAt}`);
console.log(` Days remaining: ${license.daysRemaining}`);
// Check specific features
if (license.features.includes('premium')) {
console.log(' β Premium features enabled');
enablePremiumFeatures();
}
if (license.features.includes('api_access')) {
console.log(' β API access enabled');
enableApiAccess();
}
// Start your application
runApplication();
} catch (error) {
console.error(`β License validation failed: ${error.message}`);
console.error(' Please contact support or purchase a license.');
process.exit(1);
}
}
main();
Javaβ
Add dependency to pom.xml:
<dependency>
<groupId>com.softquantus</groupId>
<artifactId>quantumlock-sdk</artifactId>
<version>1.0.0</version>
</dependency>
Integrate in your application:
import com.softquantus.quantumlock.LicenseValidator;
import com.softquantus.quantumlock.LicenseData;
import com.softquantus.quantumlock.LicenseException;
public class Application {
public static void main(String[] args) {
LicenseValidator validator = new LicenseValidator();
// Get license from config file or user input
String licenseKey = "QCOS-ABCD-EFGH-IJKL-MNOP";
try {
// Validate license (offline, no internet needed)
LicenseData license = validator.validate(licenseKey);
System.out.println("β License valid!");
System.out.println(" Customer: " + license.getCustomerId());
System.out.println(" Features: " + String.join(", ", license.getFeatures()));
System.out.println(" Expires: " + license.getExpiresAt());
System.out.println(" Days remaining: " + license.getDaysRemaining());
// Check specific features
if (license.hasFeature("premium")) {
System.out.println(" β Premium features enabled");
enablePremiumFeatures();
}
if (license.hasFeature("api_access")) {
System.out.println(" β API access enabled");
enableApiAccess();
}
// Start your application
runApplication();
} catch (LicenseException e) {
System.err.println("β License validation failed: " + e.getMessage());
System.err.println(" Please contact support or purchase a license.");
System.exit(1);
}
}
}
C#β
Install NuGet package:
Install-Package QuantumLock.SDK
Integrate in your application:
using QuantumLock.SDK;
using System;
class Program
{
static async Task Main(string[] args)
{
var validator = new LicenseValidator();
// Get license from config file or user input
string licenseKey = "QCOS-ABCD-EFGH-IJKL-MNOP";
try
{
// Validate license (offline, no internet needed)
var license = await validator.ValidateAsync(licenseKey);
Console.WriteLine("β License valid!");
Console.WriteLine($" Customer: {license.CustomerId}");
Console.WriteLine($" Features: {string.Join(", ", license.Features)}");
Console.WriteLine($" Expires: {license.ExpiresAt}");
Console.WriteLine($" Days remaining: {license.DaysRemaining}");
// Check specific features
if (license.HasFeature("premium"))
{
Console.WriteLine(" β Premium features enabled");
EnablePremiumFeatures();
}
if (license.HasFeature("api_access"))
{
Console.WriteLine(" β API access enabled");
EnableApiAccess();
}
// Start your application
RunApplication();
}
catch (LicenseException ex)
{
Console.Error.WriteLine($"β License validation failed: {ex.Message}");
Console.Error.WriteLine(" Please contact support or purchase a license.");
Environment.Exit(1);
}
}
}
Step 4: Test Validationβ
You can test license validation without authentication:
curl -X POST https://api.softquantus.com/api/v1/licenses/validate \
-H "Content-Type: application/json" \
-d '{"license_key": "QCOS-ABCD-EFGH-IJKL-MNOP"}'
Response:
{
"valid": true,
"customer_id": "cust_abc123xyz",
"end_customer_id": "test-customer-001",
"features": ["premium", "api_access"],
"issued_at": "2025-12-14T10:35:00Z",
"expires_at": "2026-12-14T10:35:00Z",
"days_remaining": 365,
"quantum_verified": true,
"metadata": {
"company": "Test Corp",
"plan": "professional"
}
}
Step 5: Monitor Usageβ
Check your license statistics:
# Using CLI
quantumlock stats
# Using API
curl https://api.softquantus.com/api/v1/stats \
-H "Authorization: Bearer $QUANTUMLOCK_API_KEY"
Response:
{
"total_licenses": 1,
"active_licenses": 1,
"expired_licenses": 0,
"this_month": 1,
"monthly_limit": 100,
"quantum_fidelity_avg": 0.9986,
"generation_time_avg_ms": 28
}
Common Integration Patternsβ
Pattern 1: License Fileβ
Store license in a file that users can import:
import json
from quantumlock_sdk import LicenseValidator
validator = LicenseValidator()
# Read license from file
with open('/etc/myapp/license.lic', 'r') as f:
license_data = json.load(f)
license_key = license_data['license_key']
# Validate
if validator.is_valid(license_key):
app.run()
Pattern 2: Environment Variableβ
Store license key in environment variable:
import os
from quantumlock_sdk import LicenseValidator
validator = LicenseValidator()
license_key = os.getenv('MYAPP_LICENSE_KEY')
if not license_key:
print("Error: MYAPP_LICENSE_KEY not set")
sys.exit(1)
if validator.is_valid(license_key):
app.run()
Pattern 3: Configuration Fileβ
Store in application config:
import configparser
from quantumlock_sdk import LicenseValidator
config = configparser.ConfigParser()
config.read('/etc/myapp/config.ini')
license_key = config['license']['key']
validator = LicenseValidator()
if validator.is_valid(license_key):
app.run()
Pattern 4: User Inputβ
Prompt user to enter license:
from quantumlock_sdk import LicenseValidator, LicenseError
validator = LicenseValidator()
print("MyApp v1.0 - License Required")
license_key = input("Enter license key: ")
try:
validator.validate(license_key)
print("β License activated!")
app.run()
except LicenseError as e:
print(f"β Invalid license: {e}")
Next Stepsβ
Need Help?β
- Email: support@softquantus.com
- Documentation: https://docs.softquantus.com
- Slack: Join our community
- GitHub: Report issues on GitHub