Overview
OpenSRE stores your PostHog project credentials for REST API access (project metadata and correlation). Configure withopensre integrations setup posthog or POSTHOG_* environment variables.
This REST integration does not register agent tools. For agent tools (analytics, feature flags, HogQL), use PostHog (MCP).
Prerequisites
- A PostHog account (US, EU, or self-hosted)
- Your PostHog project ID
- A personal API key with read access to that project — see PostHog personal API keys
Setup
Option 1: Interactive CLI
/integrations setup posthog or ask “Can you configure PostHog for me?”
- Choose US Cloud, EU Cloud, or your self-hosted app address. Setup links directly to that account’s personal API key settings and explains the required read permissions before asking for a key.
- Choose your project by name. OpenSRE discovers the project ID for you. If it is not listed, you can retry, change the key or region, or enter the ID from project settings.
- OpenSRE verifies project access, saves the connection, and shows a summary. Failed checks can be retried in place; Ctrl+C cancels.
phx_...) with project:read for setup and query:read for analytics queries. A project capture key (phc_...) cannot read your analytics.
Option 2: Environment variables
Credentials
Get the project ID from PostHog project settings. Create a personal API key (
phx_...) with read access — see PostHog personal API keys.
Tools
This REST integration does not register agent tools. For agent tools (analytics, feature flags, HogQL), use PostHog (MCP).Verify
PostHog validated.
For the MCP integration, use opensre integrations verify posthog_mcp instead.
Troubleshooting
Security
- Use a dedicated personal API key with the minimum read permissions needed
- Store credentials in environment variables or a secret manager — not in source code
- Rotate keys periodically