Authentication
The LTG API Portal uses API keys issued per subscription. There is no token expiry — keys remain valid until the subscription is revoked or the key is regenerated.
API key format
ltg_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxKeys are prefixed ltg_live_ followed by a random 32-character hex string.
Passing the API key
Include the key in the X-API-Key header on every request:
curl https://your-portal.example.com/api/your-endpoint \ -H "X-API-Key: ltg_live_xxxxxxxxxxxxxxxxxxxxxxxx"The portal’s gateway validates the key before forwarding to your upstream API.
Scope enforcement
Each subscription has a scope that limits which HTTP methods are allowed:
| Scope | Allowed methods |
|---|---|
read |
GET, HEAD, OPTIONS |
write |
GET, HEAD, OPTIONS, POST, PUT, PATCH |
admin |
All methods including DELETE |
A write-scoped key calling DELETE will be rejected:
{ "valid": false, "error": "Scope 'write' does not allow DELETE requests"}Validating a key
Your API gateway or reverse proxy should call:
POST /api/gateway/validateContent-Type: application/json
{ "apiKey": "ltg_live_...", "method": "GET", "path": "/api/tickets"}On success:
{ "valid": true, "subscriptionId": "sub_abc123", "productId": "prod_xyz", "plan": "professional", "scope": "write", "headers": { "X-RateLimit-Limit": "100", "X-RateLimit-Remaining": "87", "X-RateLimit-Reset": "42", "X-Quota-Limit": "10000", "X-Quota-Used": "234", "X-Quota-Remaining": "9766" }}Forward the headers block to your upstream so clients can track their quota.
Key regeneration
To issue a new key while invalidating the old one:
POST /api/subscriptions/:id/regenerateThe old key becomes invalid immediately.
Internal portal routes
The portal’s own admin routes (/api/products, /api/subscriptions, etc.) do not require an API key — they’re intended to be secured at the network/reverse-proxy layer for internal admin use only. Do not expose the portal API publicly without adding an auth layer.