Documentation Index
Fetch the complete documentation index at: https://developers.autoplay.ai/llms.txt
Use this file to discover all available pages before exploring further.
Auto-generated from
autoplay_sdk/skills/. Edit the source SKILL.md and run python scripts/sync_skill_docs.py..md ยท Open raw file ยท Install via CLI: autoplay-install-skills
Activity Source โ PostHog
Readautoplay-corefirst. The PostHogsession_idis thesession_idused for all session scoping throughout your Autoplay integration.
Step 1 โ Add the browser snippet
Step 2 โ Identify on login (highly recommended)
Run this immediately after your login flow completes:identify, users are tracked anonymously. session_id still works for scoping; user_id and email will be None on ActionsPayload until identity is set.
Step 3 โ Session ID in your backend
Step 4 โ PostHog webhook destination
In PostHog, add a Webhook destination:- Webhook URL:
result.webhook_urlfromonboard_product X-PostHog-Secretheader:result.webhook_secretfromonboard_product
#just-integrated in the Autoplay Slack for managed setup.
Step 5 โ Verify the webhook is firing
After setting up the destination in PostHog, trigger a page event in your app and check the PostHog destination logs (PostHog โ Data pipelines โ your webhook destination โ Logs). You should see a200 response within a few seconds.
If you see 401:
- Check that
X-PostHog-Secretis copied verbatim (exact casing) โ see Common mistakes below.
- Confirm the destination is enabled and the filter is not excluding your events.
Common mistakes
X-PostHog-Secret header lookup is case-sensitive.
PostHog delivers the secret in inputs.headers["X-PostHog-Secret"] (exact casing).
Reading inputs.headers["x-posthog-secret"] or any other casing returns None
and your webhook handler will return 401 on every request. Always copy the key
name verbatim from the onboard_product response.
Reference
- Quickstart: https://developers.autoplay.ai/quickstart
- PostHog identify docs: https://posthog.com/docs/product-analytics/identify