Skip to main content

Authentication

All API requests require authentication using an API key.

Getting Your API Key

  1. Log in to livchat.ai/dashboard
  2. Navigate to Settings > API Keys
  3. Click Create API Key
  4. Copy your key immediately (it won’t be shown again)
Store your API key securely. Never expose it in client-side code or public repositories.

Using Your API Key

Include your API key in the Authorization header:

API Key Types

Scopes

API keys have scopes that limit what they can access:

Error Responses

401 Unauthorized

Causes:
  • Missing Authorization header
  • Invalid or expired API key
  • Malformed key format

403 Forbidden

Causes:
  • API key doesn’t have permission for the requested endpoint
  • Request a new key with the required scopes

Best Practices

Store API keys in environment variables, not in code:
Create new API keys and revoke old ones regularly for security.
Only request the scopes your application needs.
Check the dashboard for API key usage and suspicious activity.

Rate Limits

API requests are rate limited to ensure fair usage: When rate limited, you’ll receive: