Authentication
The Kallglot API uses API keys to authenticate requests. Create your developer account at kallglot.com, then create and manage API keys in the Developer Portal.API Keys
API keys are used to authenticate all requests to the Kallglot API. Each key is scoped to a specific organization and can have different permission levels.Key Types
| Type | Prefix | Usage |
|---|---|---|
| Live | sk_live_ | Production environment |
| Test | sk_test_ | Development and testing |
Making Authenticated Requests
Include your API key in theAuthorization header using the Bearer token format:
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer token with your API key |
Content-Type | Yes | application/json for POST/PUT/PATCH requests |
Idempotency-Key | Recommended | Unique key to ensure idempotent requests |
WebSocket Authentication
WebSocket connections use session tokens instead of API keys. When you create a session, the response includes astream.token that authenticates the WebSocket connection:
Token Expiration
Session tokens expire after 1 hour by default. Thestream.expires_at field indicates when the token expires. For long-running sessions, the WebSocket connection remains active even after the token expires - the token is only validated at connection time.
API Key Permissions
API keys can have different permission scopes:| Permission | Description |
|---|---|
sessions:read | Retrieve session information |
sessions:write | Create and end sessions |
recordings:read | Access recordings |
recordings:delete | Delete recordings |
analysis:read | Access call analysis |
analysis:write | Request call analysis |
webhooks:manage | Manage webhook endpoints |
Creating Scoped Keys
When creating an API key, you can limit its permissions:Security Best Practices
Rotate keys regularly
Rotate keys regularly
Create new API keys periodically and revoke old ones. This limits the impact of any key that may have been compromised.
Use environment variables
Use environment variables
Never hardcode API keys in your source code. Use environment variables:
Use separate keys for test and production
Use separate keys for test and production
Test keys (
sk_test_) don’t incur charges and are rate-limited differently. Use them during development.Monitor key usage
Monitor key usage
Check the Developer Portal regularly for unusual API activity. Set up alerts for high usage patterns.
Revoke compromised keys immediately
Revoke compromised keys immediately
If you suspect a key has been compromised, revoke it immediately in the Developer Portal and create a new one.
Error Responses
Authentication errors return a401 Unauthorized response:
| Error Code | Description |
|---|---|
invalid_api_key | The API key is malformed or doesn’t exist |
expired_api_key | The API key has expired |
revoked_api_key | The API key has been revoked |
insufficient_permissions | The API key lacks required permissions |
Rate Limiting by Key Type
| Key Type | Requests/minute | Concurrent Sessions |
|---|---|---|
| Test | 60 | 5 |
| Live (Starter) | 120 | 10 |
| Live (Pro) | 600 | 50 |
| Live (Enterprise) | Custom | Custom |
See Rate Limits for detailed information about rate limiting.