Set up credentials
Find your project API key
In PostHog, go to Settings > Project and copy the Project API key.
This key identifies your project. Note that it is used mainly for event
ingestion, not for reading data.
Identify your host
Your host depends on where your project is hosted:
https://us.i.posthog.com
for US Cloud, https://eu.i.posthog.com for EU Cloud, or your own domain for
a self-hosted instance.Create a personal API key
Go to Settings > Account > Personal API keys and click
Create personal API key. Give it a label and select the read scopes you
need, such as Query Read. Click Create key.
To read analytics data (events, insights, funnels, retention), Adapt needs the
personal API key. The project API key on its own is intended for event
ingestion and cannot read your data, so provide the personal API key even
though it is listed as optional below.
Connect to Adapt
Add your credentials
Enter the values you gathered above, then click Add connection:
You can rename the connection and choose whether it is shared with your
organization or kept personal to you.
| Secret Name | Value |
|---|---|
POSTHOG_PROJECT_API_KEY | Your project API key |
POSTHOG_HOST | Your PostHog host, e.g. https://us.i.posthog.com (optional) |
POSTHOG_PERSONAL_API_KEY | Your personal API key (optional) |
Security
- Credentials are encrypted at rest with AES-256
- Scope the personal API key to only the read permissions you need, such as Query Read
- A personal API key grants the same access as your account, so limit its scopes
- The personal API key is shown only once; store it securely and revoke it anytime
- Never share your keys or commit them to source control