← Back
PostHog Connection Setup
Finding Your PostHog Credentials
To connect your PostHog account, you will need four pieces of information:
- Project API Key: Used for sending data (like events) to PostHog.
- Personal API Key: Used for reading data (like insights and persons) from PostHog's private API.
- Project ID: Identifies which project to read data from.
- PostHog Host URL: The URL of your PostHog instance (e.g.,
https://us.posthog.com
).
1. Find your Project API Key and Project ID
- In your PostHog instance, navigate to the project you want to connect.
- Go to Project Settings.
- You will find the Project API Key and Project ID listed here. Copy both of them.
2. Create a Personal API Key
- In the top right corner, click on your user avatar and select Account settings.
- Navigate to the Personal API keys tab on the left.
- Click + Create a personal API Key.
- Give your key a descriptive label (e.g., "Toolstream Agent").
- Important: Immediately copy the key value. You will not be able to see it again after you leave this page.
3. Determine your PostHog Host URL
This is the main URL you use to access PostHog.
- If you use PostHog Cloud (US), it is:
https://us.posthog.com
- If you use PostHog Cloud (EU), it is:
https://eu.posthog.com
- If you are self-hosting PostHog, it is the URL of your instance.