PluginsPostHog
Get Credentials
Step-by-step instructions for obtaining PostHog credentials
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
- Log in to your PostHog account
- Navigate to Project Settings
- Click on Project API Key in the left sidebar
- Copy your Project API Key
- Store it securely
Storing Credentials:
Store the API key with the Corsair CLI:
pnpm corsair setup --posthog api_key=your-api-keyVerify it was saved:
pnpm corsair auth --plugin=posthog --credentialsPersonal API Key (Optional)
For advanced API access, you can also create a Personal API Key:
- In PostHog, click on your profile icon (top right)
- Go to Personal API Keys
- Click Create Personal API Key
- Give it a name and copy the key
- Important: Store this key securely - you won't be able to see it again
Webhook Secret
Step 1: Create Webhook Destination
- Go to your PostHog project settings
- Navigate to Data Pipelines → Destinations
- Click New destination
- Select Webhook as the destination type
- Configure:
- Webhook URL: Your webhook endpoint (e.g.,
https://yourapp.com/api/webhook) - Events: Select
event_capturedor all events
- Webhook URL: Your webhook endpoint (e.g.,
- Click Save
- If a webhook secret is provided, copy it and store securely
Storing Credentials:
Store the webhook secret with the CLI:
pnpm corsair setup --posthog webhook_signature=your-webhook-secretRequired Credentials Summary
| Credential | Required For | Where to Find |
|---|---|---|
| Project API Key | API Key auth | Project Settings → Project API Key |
| Personal API Key | Advanced API access (optional) | Profile → Personal API Keys |
| Webhook Secret | Webhooks | Data Pipelines → Destinations → Webhook |
For general information about how Corsair handles authentication, see Authentication.