users
users

Start GitHub personal integration linking

Start GitHub linking: either full App install or OAuth-only (user-to-server).

**_kwargs absorbs parent_lookup_uuid from the nested /api/users/{uuid}/integrations/ router (same pattern as local_evaluation under projects).

Usually returns install_url pointing at /installations/new so the user can pick any GitHub org (new or already connected). GitHub's install page handles both cases: orgs where the app is installed show "Configure" (no admin needed), orgs where it isn't show "Install" (needs admin).

OAuth fast path: when the current project already has a team-level GitHub installation, and the user has no UserIntegration for that installation yet, we skip the org picker and redirect straight to /login/oauth/authorize so the user only authorizes themselves. connect_from is preserved for first-party clients so they return to the originating client immediately.

In both cases the response key is install_url for compatibility with callers.

post/api/users/{uuid}/integrations/github/start/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/users/{uuid}/integrations/github/start/
  • Auth: HTTP bearer

Path parameters

uuidstring required

Request body

team_idinteger nullable

Optional team/project id (e.g. PostHog Desktop); web UI uses the session's current team.

connect_fromstring

Optional client hint (e.g. posthog_code) for return routing after OAuth.

Response

install_urlstring required

URL to open in the browser to install or authorize the GitHub App for this user.

connect_flowstring required

OAuth or install flow used for this GitHub connection.

Changes

No recorded changes to this operation across all 1 revision of this API.