Authentication
All API endpoints require authentication using API keys. Gigantics supports two methods for providing the API key with each request.
Authentication Methods
Query Parameter
Include the API key as a query parameter:
Authorization Header
Include the API key in the Authorization header using Bearer token format:
Priority: If both methods are provided, the query parameter takes precedence.
API Key Format
API keys generated by Gigantics follow this format:
Where:
prefix- 10 characters (used for identification in the UI)key- 21 characters- Total length: 31 characters
 - Format: URL-safe alphanumeric characters
 
Example: abc123xyz-def456uvw-ghi789rst
Key Validation Process
When a request arrives at an endpoint, the system:
- Extracts the key from either the query parameter or Authorization header
 - Loads the endpoint configuration from the database
 - Iterates through assigned keys for that endpoint:
- Loads each API key record
 - Skips inactive keys (
isActive: false) - Compares the provided key against the stored bcrypt hash
 - Stops on first match
 
 - Returns result:
- If a match is found → request is authenticated
 - If no match → returns 
403 Forbiddenwith message "Unknown API key" 
 
Multiple Keys per Endpoint
When multiple API keys are assigned to an endpoint, any of the assigned keys will authenticate the request. This enables:
- Zero-downtime key rotation
 - Multi-party access with different keys
 - Backup keys for emergency access
 
The system checks all assigned keys until it finds a match. See Multiple API Keys per Endpoint for more details.
Key Security
Storage
- API keys are stored as bcrypt hashes in the database
 - The plain-text key is only shown once during creation
 - Keys cannot be retrieved after creation - they must be regenerated
 
Key States
- Active (
isActive: true) - Key can authenticate requests - Inactive (
isActive: false) - Key is disabled and will not authenticate 
Key Management
- Keys can be edited to change their purpose or active status
 - Keys can be deleted, which immediately revokes access
 - Deleting a key does not delete the endpoints - endpoints just lose that authentication method
 
Error Responses
Missing Key
Status: 403 Forbidden
Response:
Invalid Key
Status: 403 Forbidden
Response:
Inactive Key
Status: 403 Forbidden
Response:
Unknown Endpoint
Status: 403 Forbidden
Response:
Usage Tracking
When a request is successfully authenticated:
- The endpoint's 
callscounter is incremented - The API key's 
updatedAttimestamp is updated - This data is visible in the UI:
- Endpoint call counts appear on the API Keys page
 - Last used time shows when the key was last used
 
 
Best Practices
- Never commit keys to version control - Use environment variables or secret managers
 - Use HTTPS only - API keys sent over HTTP can be intercepted
 - Rotate keys regularly - Especially if a key might be compromised
 - Deactivate instead of delete - When troubleshooting, deactivate keys so you can reactivate them without recreating endpoints
 - Use descriptive purposes - Name keys by their use case (e.g., "Production Dashboard", "ETL Job")
 - Monitor usage - Check the "Last called" and call counts to detect unauthorized access
 
Related Documentation
- API Endpoint Assignment - Learn how to create and assign endpoints
 - Multiple API Keys per Endpoint - Understand multiple key assignment
 - Access Control - Review permissions for managing API keys