API Key Authentication
Recommended for programmatic access and automation scripts. API keys provide secure, long-term access to the Orchestrator API. They’re perfect for server-side applications, automation scripts, and CI/CD pipelines.Getting Your API Key
- Log in to your Orchestrator dashboard
- Navigate to Settings → API Keys
- Click Create API Key and give it a descriptive name
- Copy and securely store your API key
API keys provide full access to your account. Store them securely and never commit them to version control.
Using API Keys
Include your API key in theAuthorization header of every request:
API Key Format
API keys follow this format:- Always start with
orch_ - Followed by 40 hexadecimal characters
- Case-sensitive
JWT Token Authentication
Used by the web dashboard and browser-based applications. JWT tokens are short-lived tokens used primarily by the Orchestrator web dashboard. They’re automatically managed by the browser and typically not used for direct API integration.Token Format
JWT tokens are included in theAuthorization header:
JWT tokens expire after a set period and are automatically refreshed by the web dashboard. For programmatic access, use API keys instead.
Authentication Errors
When authentication fails, the API returns a401 Unauthorized response:
Common Authentication Issues
Invalid API Key Format
Invalid API Key Format
Error:
Invalid API key formatSolution: Ensure your API key starts with orch_ and is exactly 45 characters long.API Key Not Found
API Key Not Found
Error:
API key not foundSolution: Verify the API key exists in your dashboard and hasn’t been deleted.Missing Authorization Header
Missing Authorization Header
Expired JWT Token
Expired JWT Token
Error:
Token expiredSolution: Refresh your browser session or use an API key for programmatic access.Security Best Practices
Secure Storage
Store API keys in environment variables or secure credential stores, never in code.
Rotate Regularly
Rotate API keys periodically and immediately if compromised.
Principle of Least Privilege
Create separate API keys for different applications with descriptive names.
Monitor Usage
Monitor API key usage in your dashboard to detect unauthorized access.
Environment Variables
Store your API key securely using environment variables:Next Steps
Now that you understand authentication, you’re ready to create your first browser session:Create Your First Session
Learn how to create and configure browser sessions