API authentication

Tracking code installation, webhooks, and API documentation

Secure API access with authentication keys and tokens, including best practices for key management.

API Key Types

Different key types for different use cases:

  • Public Keys: Client-side integrations (limited access)
  • Secret Keys: Server-side integrations (full access)
  • Read-only Keys: Data access without modification
  • Scoped Keys: Limited to specific endpoints

Generating API Keys

Create API keys from your dashboard:

  1. Go to Settings > API Keys
  2. Click "Generate New Key"
  3. Select key type and permissions
  4. Add description and expiration date
  5. Save the key securely

Authentication Methods

Bearer Token (Recommended)

Authorization: Bearer YOUR_API_KEY

Query Parameter

GET /api/v1/visitors?api_key=YOUR_API_KEY

Header Authentication

X-API-Key: YOUR_API_KEY

Security Best Practices

  • Store keys securely in environment variables
  • Use HTTPS for all API requests
  • Rotate keys regularly
  • Monitor API usage for anomalies
  • Revoke compromised keys immediately

Was this article helpful?