Retrieve data from your endpoint
- 1
Create a personal API key
RequiredCreate a personal API key with the
endpoint:readscope to authenticate your requests.- Go to Personal API Keys in your PostHog settings
- Click Create personal API key
- Give it a name (e.g., "Endpoints")
- Select the
endpoint:readscope - Click Create key and copy it somewhere safe
Personal API keys are secret!Store your API key securely. Never expose it in client-side code or commit it to version control. - 2
Choose your language
RequiredSelect your language or framework to see how to call your endpoint.