Skip to main content

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

The most secure way to provide credentials:

Programmatic Configuration

Pass credentials directly when needed:
Only use programmatic configuration when environment variables aren’t available. Always use secrets management for production deployments.

Configuration File

For development environments:

Connection Process

WebSocket Connection

When you call agent.start(), the SDK:
  1. Validates credentials locally (format checks)
  2. Establishes WebSocket connection to the platform
  3. Sends authentication message with API key and customer ID
  4. Receives confirmation or error
  5. Registers tools with the platform
  6. 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:
Good:

2. Use .env Files

For local development:
Important: Add .env to .gitignore:

3. Use Secrets Management

For production: AWS Secrets Manager:
HashiCorp Vault:

4. Rotate Keys Regularly

Implement key rotation:

5. Different Keys Per Environment

Use separate API keys for each environment:
This allows you to:
  • 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