Skip to main content
The License Service API provides secure endpoints for license verification and file downloads. This guide covers all available endpoints with practical cURL examples. Base URL: /api/license

Authentication Requirements

All protected endpoints require:
  1. Bearer Token: Your license key in the Authorization header
  2. Domain Validation: Domain must be provided and match your license configuration
  3. Product ID Validation: Product ID must be provided and match your license’s product

Authentication Headers

OR include domain and product_id in request body:

Endpoint 1: Verify License

Purpose: Verify your license key and get license information
Method: GET
Authentication: Required
Rate Limited: Yes (60 requests/minute)

cURL Command

Alternative with Domain and Product ID in Body

Example Response

Common Error Responses

401 Unauthorized - Invalid license key:
400 Bad Request - Missing domain or product_id:
403 Forbidden - Domain mismatch or product ID mismatch:

Endpoint 2: Generate Download Token

Purpose: Create a one-time download token for accessing product files
Method: POST
Authentication: Required
Rate Limited: Yes (60 requests/minute)

cURL Command

Alternative with Domain and Product ID in Body

Example Response

Common Error Responses

403 Forbidden - API download disabled:
404 Not Found - No downloadable file:

Endpoint 3: Download File

Purpose: Download a file using a one-time token
Method: GET
Authentication: None (uses token)
Rate Limited: No

cURL Command

Flags Explained:
  • -O: Save file with original filename
  • -J: Use filename from Content-Disposition header

Alternative with Custom Filename

Example Response

Success: File download with headers:
Error Response:

Complete Workflow Example

Here’s a complete example of the entire download process:

Step 1: Verify License

Step 2: Generate Download Token

Step 3: Download File


Rate Limiting

  • Default Limit: 60 requests per minute per IP
  • Response: HTTP 429 when exceeded
  • Headers: Rate limit information included in responses

Check Rate Limit Status


Security Features

  1. One-Time Tokens: Download tokens expire after 24 hours and can only be used once
  2. Domain Validation: All requests must include and validate the domain
  3. Product ID Validation: All requests must include and validate the product ID
  4. Bearer Authentication: Secure token-based authentication
  5. Rate Limiting: Prevents abuse and ensures fair usage
  6. No-Cache Headers: Prevents browser caching of sensitive responses

Troubleshooting

Common Issues

  1. “Authorization header missing”
    • Ensure Authorization: Bearer YOUR_KEY header is present
  2. “Domain is required”
    • Include X-Domain header or domain in request body
  3. “Product ID is required”
    • Include X-Product-ID header or product_id in request body
  4. “License is inactive”
    • Check if license is active in admin panel
  5. “Product ID mismatch”
    • Ensure the product_id matches your license’s product
  6. “Too many requests”
    • Wait for rate limit window to reset (1 minute)
  7. “Invalid or expired download token”
    • Generate a new download token
    • Tokens expire after 24 hours