Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through obtaining all required credentials for the PostHog plugin.

Authentication Method

The PostHog plugin uses API key authentication.
  • api_key (default) - Project API key authentication

API Key Setup

Step 1: Get Project API Key

  1. Log in to your PostHog account
  2. Navigate to Project Settings
  3. Click on Project API Key in the left sidebar
  4. Copy your Project API Key
  5. Store it securely
Storing Credentials: Store the API key with the Corsair CLI:
pnpm corsair setup --plugin=posthog api_key=your-api-key
Verify it was saved:
pnpm corsair auth --plugin=posthog --credentials

Personal API Key (Optional)

For advanced API access, you can also create a Personal API Key:
  1. In PostHog, click on your profile icon (top right)
  2. Go to Personal API Keys
  3. Click Create Personal API Key
  4. Give it a name and copy the key
  5. Important: Store this key securely - you won’t be able to see it again

Webhook Secret

Step 1: Create Webhook Destination

  1. Go to your PostHog project settings
  2. Navigate to Data PipelinesDestinations
  3. Click New destination
  4. Select Webhook as the destination type
  5. Configure:
    • Webhook URL: Your webhook endpoint (e.g., https://yourapp.com/api/webhook)
    • Events: Select event_captured or all events
  6. Click Save
  7. If a webhook secret is provided, copy it and store securely
Storing Credentials: Store the webhook secret with the CLI:
pnpm corsair setup --plugin=posthog webhook_signature=your-webhook-secret

Required Credentials Summary

CredentialRequired ForWhere to Find
Project API KeyAPI Key authProject Settings → Project API Key
Personal API KeyAdvanced API access (optional)Profile → Personal API Keys
Webhook SecretWebhooksData Pipelines → Destinations → Webhook
For general information about how Corsair handles authentication, see Authentication.