How API Keys Work
API keys are Personal Access Tokens (PATs) that provide a secure way to authenticate API requests. Each key has:- Unique Token: A secure token value shown only once at creation
- Display Name: A user-friendly name you choose
- Scopes: Fine-grained permissions controlling what the key can access
- Expiration: Optional expiration date
Permission Scopes
API keys use a scope-based permission system with the format:service:resource:action
Scope Levels
Full Access
Full Access
Grant complete access to all services and operations.Scope:
["*"]Use case: Development and testing environmentsService-Level Access
Service-Level Access
Grant access to all operations within specific services.Example:
service:* - All operations for a specific serviceUse case: Production applications using specific servicesGranular Access
Granular Access
Grant access to specific operations within services.Examples:
service:resource:action- Specific operation onlyappcore:payment:update- Access billing portal only
Wildcard Support
Scopes support wildcards for flexible permission management:*- Full access to everythingservice:*- All operations in a serviceservice:resource:*- All actions on a resource
Available Scopes
AppCore:appcore:payment:update- Access billing portal URLappcore:team:read- Read team informationappcore:team:write- Manage teams
Security Features
Token Security
- One-Time Display: Token value shown only at creation
- Secure Storage: Tokens stored securely
- Scope Validation: Every request validates required permissions
Expiration
- Optional Expiration: Set expiration date or create non-expiring keys
- Flexibility: Choose the expiration that fits your security needs
Best Practices
Principle of Least Privilege
Grant only the minimum scopes required for each use case
Separate Keys
Create different keys for different applications or environments
Descriptive Names
Use clear names that indicate the key’s purpose
Regular Rotation
Periodically rotate keys, especially for production use
Secure Storage
Store keys in environment variables or secure vaults
Revoke Unused Keys
Delete keys that are no longer needed
