Skip to content

Authentication

Learn how to authenticate your applications with Kopai.

Kopai uses bearer tokens for API authentication. All OTLP requests must include your token in the Authorization header.

  1. Navigate to SettingsAccess Tokens
  2. Click Generate New Token
  3. Give your token a descriptive name
  4. Copy the token immediately (it won’t be shown again)

Include your token in the Authorization header:

Terminal window
Authorization: Bearer YOUR_TOKEN

Or set via environment variable:

Terminal window
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_TOKEN"
  • Use separate tokens for different environments (dev, staging, prod)
  • Rotate tokens regularly
  • Never commit tokens to source control
  • Revoke unused tokens promptly