Authentication & Security
The Tournament Platform uses operator API keys with role-based permissions to provide secure, multi-tenant access to tournament functionality.API Key Authentication
All Casino Integration APIs require authentication via operator API keys passed in the Authorization header:API Key Format
Tournament Platform uses compound API keys with the following format:- Format:
pk_xxx:sk_yyywherepk_is the public key prefix andsk_is the secret key prefix - Example:
pk_1234567890abcdef:sk_9876543210fedcba... - Usage: The full compound key is used in the Authorization header
- Security: Keys use SHA256 hashing for authentication validation
Role-Based Permissions
API keys are assigned to operator roles that define specific permissions. This enables fine-grained access control for different use cases.
Available Permissions
| Permission | Description | Example Use Case |
|---|---|---|
tournaments.read | View tournaments and status | Displaying tournament lists, checking status |
tournaments.write | Create and update tournaments | Creating scheduled tournaments, updating settings |
tournaments.delete | Cancel tournaments | Emergency tournament cancellation |
players.read | View player data and registrations | Displaying participant lists, player stats |
players.write | Register and manage players | Player registration, rebuy processing |
results.read | Access results and leaderboard data | Showing leaderboards, final results |
Common Role Configurations
- Full Access
- Tournament Manager
- Read Only
- Player Registration
All Permissions - For primary integration systems:
API Key Management
Creating API Keys
Create New Key
Click “Create API Key” and provide:
- Name: Descriptive name for the key
- Role: Select appropriate role with required permissions
- Expiration: Optional expiration date for security
Key Security Best Practices
Storage & Environment
- Store keys in environment variables or secure credential management systems
- Use different keys for development, staging, and production environments
- Rotate keys regularly (recommended: every 90 days)
- Set expiration dates on keys when possible
Access Control
- Use least-privilege principle - grant only necessary permissions
- Create separate keys for different systems or purposes
- Monitor key usage and disable unused keys
- Implement IP whitelist restrictions when possible
Example Environment Configuration
Multi-Tenant Security
Operator Isolation
The Tournament Platform provides complete tenant isolation:- Data Scoping: All API responses automatically filtered by operator ID
- Resource Access: No cross-operator access to tournaments or players
- Configuration Isolation: Independent webhook URLs, settings, and preferences
- Audit Trails: Separate audit logs per operator
Request Validation
Every API request undergoes:- API Key Validation: Verify key exists and is active
- Permission Check: Ensure key has required permissions for operation
- Operator Scoping: Filter all data to operator’s resources only
- Rate Limiting: Apply per-operator rate limits
- Request Logging: Log all API access for audit purposes
Rate Limiting
Standard Limits
| Operation Type | Limit | Window |
|---|---|---|
| Tournament Operations | 100 requests | per minute |
| Tournament Creation | 10 requests | per minute |
| Player Registration | 200 requests | per minute |
| Results/Leaderboards | 500 requests | per minute |
| General API Calls | 1000 requests | per minute |
Rate Limit Headers
API responses include rate limit information:Handling Rate Limits
Error Handling
All API endpoints return consistent JSON error responses. The platform no longer returns HTML error pages for validation failures.
Authentication Errors
401 Unauthorized
- Invalid or expired API key
- Malformed Authorization header
- Key not found in system
403 Forbidden
- API key lacks required permission
- Attempting to access another operator’s resources
- Operation not allowed for key’s role
422 Validation Error
- Missing required fields
- Invalid data formats
- Business rule violations
Security Headers
All API responses include security headers:Testing Authentication
Verify API Key
Check Permissions
Next Steps
Tournament Management
Start creating and managing tournaments with your authenticated API access.
Player Management
Learn how to register and manage players in your tournaments.

