Authentication
Secure your Klyra API requests with authentication
API Key Authentication
All requests to the Klyra API require authentication using your API key. Your API key carries many privileges, so be sure to keep it secure. Don’t share your API key in publicly accessible areas such as GitHub, client-side code, or in your frontend applications.
Obtaining API Keys
You can generate API keys from the Klyra Dashboard. Each project can have multiple API keys with different permissions.
- Log in to your Klyra Dashboard
- Navigate to the Projects section
- Select your project or create a new one
- Go to API Keys in the project settings
- Click “Generate New Key”
We recommend creating separate API keys for development and production environments. This makes key rotation and revocation easier in case of a security incident.
Using API Keys
Authentication to the API is performed via HTTP Bearer Authentication. Provide your API key as the bearer token value in the Authorization
header.
Key Management
API Key Best Practices
- Never hardcode API keys in your application source code
- Use environment variables or secure vaults to store keys
- Rotate keys periodically (we recommend every 90 days)
- Use separate keys for different environments and services
- Implement proper access controls for who can view and manage keys
Revoking API Keys
If an API key is compromised, you should immediately revoke it from the Klyra Dashboard:
- Log in to your Klyra Dashboard
- Navigate to your project settings
- Find the compromised key and click “Revoke”
- Generate a new key to replace the revoked one
Revoking a key immediately stops it from working. Ensure you’ve updated your application with a new key before revoking an active one to prevent service disruption.
Organization Access Keys
For enterprise customers, Klyra offers Organization Access Keys that provide more granular permissions and can be restricted to specific actions or resources. Contact our support team to learn more about organization-level access controls.