:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(docs): point integration paths at the split package (#86752)
posthog[bot]c22280c716ae
diff --git a/.agents/skills/adding-inbox-sources/SKILL.md b/.agents/skills/adding-inbox-sources/SKILL.mdindex 0238a9a25a48..ffb0f8ce49cf 100644--- a/.agents/skills/adding-inbox-sources/SKILL.md+++ b/.agents/skills/adding-inbox-sources/SKILL.md@@ -69,7 +69,7 @@ Only two field types still lack a generic renderer (disable submit): `ssh-tunnel`DynamicSourceSetup` opportunistically; don't add new ones.Supported OAuth `kind` values (posthog `OauthIntegration.supported_kinds`,-`posthog/models/integration.py`): `slack, salesforce, hubspot, google-ads,+`posthog/models/integration/oauth.py`): `slack, salesforce, hubspot, google-ads,google-analytics, google-search-console, google-sheets, snapchat, linkedin-ads,reddit-ads, tiktok-ads, bing-ads, meta-ads, intercom, linear, clickup, jira,pinterest-ads, stripe` (+ `github` via App install). **A source not in this listdiff --git a/.agents/skills/implementing-warehouse-sources/SKILL.md b/.agents/skills/implementing-warehouse-sources/SKILL.mdindex 8e684bcde955..08f528be68bb 100644--- a/.agents/skills/implementing-warehouse-sources/SKILL.md+++ b/.agents/skills/implementing-warehouse-sources/SKILL.md@@ -657,7 +657,9 @@ Requirements and behavior:## OAuth configuration-Before implementing OAuth, **check if the integration already exists** — search `posthog/models/integration.py` loosely for the service name before concluding it's new.+Before implementing OAuth, **check if the integration already exists** — search the `posthog/models/integration/` package loosely for the service name before concluding it's new.+The kinds live in `model.py` and the OAuth wiring in `oauth.py`; a provider only gets its own module when it carries business logic beyond the OAuth config, as Slack, GitHub, and Stripe do.+`__init__.py` only re-exports the public surface, so keep importing from `posthog.models.integration` but make edits in the defining module.If new:@@ -668,10 +670,10 @@ If new:YOUR_SOURCE_CLIENT_SECRET = get_from_env("YOUR_SOURCE_CLIENT_SECRET", "")```-2. **Integration kind**. In `posthog/models/integration.py`:- - Add to `IntegrationKind` enum.- - Add to `OauthIntegration.supported_kinds`.- - Add an `elif kind == "your-source": return OauthConfig(...)` branch in `oauth_config_for_kind()`.+2. **Integration kind**.+ - Add to the `IntegrationKind` enum in `posthog/models/integration/model.py`.+ - Add to `OauthIntegration.supported_kinds` in `posthog/models/integration/oauth.py`.+ - Add an `elif kind == "your-source": return OauthConfig(...)` branch in `oauth_config_for_kind()`, also in `oauth.py`.Raise `NotImplementedError("<Source> app not configured")` when the env vars are empty — that's thefail-closed message, so code and charts can ship before the secret values exist.- If the provider's token response has **no account identifier** (e.g. Resend), decode thediff --git a/docs/internal/slack-local-setup-guide.md b/docs/internal/slack-local-setup-guide.mdindex b7905b8df4eb..95daa29d6371 100644--- a/docs/internal/slack-local-setup-guide.md+++ b/docs/internal/slack-local-setup-guide.md@@ -32,7 +32,7 @@ Slack ──HTTPS──▶ ngrok edge ──▶ ngrok agent (laptop) ──through to nothing and you get `200 OK` with an **empty body**. That's why the tunnelmust rewrite the Host header to `localhost` (Step 1).- The OAuth `redirect_uri` is built **server-side** from `SITE_URL`, not from the browser- address bar (`OauthIntegration.redirect_uri()` in `posthog/models/integration.py`), and it+ address bar (`OauthIntegration.redirect_uri()` in `posthog/models/integration/oauth.py`), and itforce-upgrades the scheme to https — `SITE_URL.replace('http://', 'https://')`. `SITE_URL`defaults to `http://localhost:8010` (`posthog/settings/__init__.py:69`), so at that defaultSlack is handed `https://localhost:8010/...` — which has no TLS, hence the browser SSL error.diff --git a/docs/published/handbook/engineering/vercel-integration.md b/docs/published/handbook/engineering/vercel-integration.mdindex d1e02a575f1e..26f924825d13 100644--- a/docs/published/handbook/engineering/vercel-integration.md+++ b/docs/published/handbook/engineering/vercel-integration.md@@ -544,7 +544,7 @@ For integration or billing issues that need Vercel's involvement, post in the sh| `ee/vercel/integration.py` | `VercelIntegration` class - core logic (upsert, delete, sync flags) || `ee/billing/billing_manager.py` | `BillingManager` - intermediary for all billing service calls || `posthog/models/organization_integration.py` | `OrganizationIntegration` model (org-level, stores Vercel credentials) |-| `posthog/models/integration.py` | `Integration` model (team/project-level resource record) |+| `posthog/models/integration/model.py` | `Integration` model (team/project-level resource record) |### Billing repo (`billing/`)diff --git a/posthog/api/github_callback/README.md b/posthog/api/github_callback/README.mdindex ee5783615a86..6114c4689a8e 100644--- a/posthog/api/github_callback/README.md+++ b/posthog/api/github_callback/README.md@@ -9,10 +9,10 @@ the integration records.There are two integration records, created by two related flows:-| Record | Model | Created by | Used by |-| ------------------------------------- | ------------------------------------ | ----------------------------------------------------------------- | ---------------------------------------------- |-| **Team** `Integration(kind="github")` | `posthog/models/integration.py` | `team_services.create_team_github_integration_from_oauth_code` | Tasks/Code, signals custom agents, deployments |-| **Personal** `UserIntegration` | `posthog/models/user_integration.py` | `personal_finish.github_link_complete` (`/complete/github-link/`) | per-user GitHub linking |+| Record | Model | Created by | Used by |+| ------------------------------------- | ------------------------------------- | ----------------------------------------------------------------- | ---------------------------------------------- |+| **Team** `Integration(kind="github")` | `posthog/models/integration/model.py` | `team_services.create_team_github_integration_from_oauth_code` | Tasks/Code, signals custom agents, deployments |+| **Personal** `UserIntegration` | `posthog/models/user_integration.py` | `personal_finish.github_link_complete` (`/complete/github-link/`) | per-user GitHub linking |Both are created from a GitHub App **installation** plus a user-to-server OAuth**code**. The App-as-App JWT (for installation tokens) is signed indiff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/README.md b/products/warehouse_sources/backend/temporal/data_imports/sources/README.mdindex 5065251db32a..3360e551b3b8 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/README.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/README.md@@ -133,9 +133,10 @@ If your source uses OAuth (SourceFieldOauthConfig):YOUR_SOURCE_CLIENT_SECRET = get_from_env("YOUR_SOURCE_CLIENT_SECRET", "")```-2. **Integration Kind**: Add your integration to `posthog/models/integration.py`:+2. **Integration Kind**: Add your integration to the `posthog/models/integration/` package.+ Its `__init__.py` only re-exports the public surface, so edit the defining modules below.- **a) Add to `IntegrationKind` enum:**+ **a) Add to the `IntegrationKind` enum in `model.py`:**```pythonclass IntegrationKind(models.TextChoices):@@ -143,7 +144,7 @@ If your source uses OAuth (SourceFieldOauthConfig):YOUR_SOURCE = "your-source"```- **b) Add to `OauthIntegration.supported_kinds` list:**+ **b) Add to the `OauthIntegration.supported_kinds` list in `oauth.py`:**```pythonsupported_kinds = [@@ -152,7 +153,7 @@ If your source uses OAuth (SourceFieldOauthConfig):]```- **c) Add OAuth config in `oauth_config_for_kind()` method:**+ **c) Add OAuth config in the `oauth_config_for_kind()` method, also in `oauth.py`:**```pythonelif kind == "your-source":diff --git a/services/stripe-app/README.md b/services/stripe-app/README.mdindex fb9ff9a15b0c..2b7b14790d35 100644--- a/services/stripe-app/README.md+++ b/services/stripe-app/README.md@@ -37,7 +37,7 @@ The three secrets stored in Stripe are:Key files:-- `posthog/models/integration.py` — `StripeIntegration` class: writes and clears secrets in Stripe+- `posthog/models/integration/stripe.py` — `StripeIntegration` class: writes and clears secrets in Stripe- `posthog/api/integration.py` — triggers `write_posthog_secrets()` after Stripe OAuth callback- `posthog/settings/integrations.py` — env vars (`STRIPE_APP_CLIENT_ID`, `STRIPE_APP_SECRET_KEY`,`STRIPE_POSTHOG_OAUTH_CLIENT_ID`, `STRIPE_APP_OVERRIDE_AUTHORIZE_URL`)