Overview
Conversimple uses API key authentication to secure your agent’s connection to the platform. Each agent instance requires both an API key and a customer ID to establish a connection.Credentials
API Key
Your API key is a secret token that identifies your account and authorizes access to the platform. Format:cs_live_xxxxxxxxxxxxxxxxxxxxx (production) or cs_test_xxxxxxxxxxxxxxxxxxxxx (development)
Security: Treat your API key like a password:
- Never commit API keys to version control
- Rotate keys periodically
- Use environment variables to store keys
- Use different keys for development and production
Customer ID
Your customer ID uniquely identifies your organization on the platform. Format:cust_xxxxxxxxxxxxxxxxxxxxx
Purpose:
- Identifies your organization for billing and usage tracking
- Enables multi-tenant isolation
- Associates conversations with your account
Configuration Methods
Environment Variables (Recommended)
The most secure way to provide credentials:Programmatic Configuration
Pass credentials directly when needed:Configuration File
For development environments:Connection Process
WebSocket Connection
When you callagent.start(), the SDK:
- Validates credentials locally (format checks)
- Establishes WebSocket connection to the platform
- Sends authentication message with API key and customer ID
- Receives confirmation or error
- Registers tools with the platform
- Enters ready state to handle conversations
Authentication Errors
Common authentication errors:Security Best Practices
1. Use Environment Variables
Never hardcode credentials in source code: ❌ Bad:2. Use .env Files
For local development:.env to .gitignore:
3. Use Secrets Management
For production: AWS Secrets Manager:4. Rotate Keys Regularly
Implement key rotation:5. Different Keys Per Environment
Use separate API keys for each environment:- Test without affecting production
- Track usage per environment
- Revoke keys independently
- Set different rate limits
Monitoring Authentication
Connection Health
Monitor your connection status:Logging Authentication Events
Track authentication for debugging and auditing:Troubleshooting
Connection Timeout
If connection takes too long:Network Issues
Test platform connectivity:Debugging Authentication
Enable debug logging:Next Steps
Conversation Lifecycle
Learn about conversation flow
Error Handling
Handle authentication errors gracefully