Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.alterauth.com/llms.txt

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

Overview

Use PostHog credentials to make authenticated API calls through Alter Vault without exposing your API keys in code.
PropertyValue
Provider IDposthog
CategoryDeveloper Tools
Credential TypeBearer Token

Step 1: Get Your Credentials

1

Log in to PostHog

Log in to PostHog at us.posthog.com.
2

Go to Settings → User → Personal API Keys

Go to Settings → User → Personal API Keys at us.posthog.com/settings/user-api-keys.
3

Create a personal API key

Click ‘Create personal API key’, set a label and permissions.
4

Copy your API key

Copy the generated Personal API Key (starts with phx_).
5

Enter host if needed

If using EU cloud or self-hosted, enter the host in the PostHog Host field.
Never share your credentials publicly. Store them securely and only enter them in the Alter Vault Developer Portal.

Step 2: Add to Alter Vault

1

Open the Developer Portal

Go to portal.alterauth.com and navigate to your app.
2

Add PostHog

Go to Managed Secrets > Add Provider > PostHog.
3

Enter your credentials

Paste your Personal API Key into the credential field. If using EU Cloud or a self-hosted instance, also enter your PostHog host (e.g. eu.i.posthog.com) in the PostHog Host field.
4

Save

Click Save. You’ll receive a grant_id to use with the SDK.

Using in Code

response = await vault.request(
    HttpMethod.GET,
    "https://us.i.posthog.com/api/projects/YOUR_PROJECT_ID/events",
    grant_id="YOUR_GRANT_ID",  # Use eu.i.posthog.com for EU cloud or your own host for self-hosted
)