users
users

Connect a ChatGPT account for Codex cloud tasks

Submit the tokens object of the auth.json that codex login wrote on the user's machine. PostHog refreshes the chain once to prove it works, stores the rotated tokens encrypted, and from then on refreshes them for the user's Codex cloud runs. Only the owning user can connect. No response carries a token.

post/api/users/{uuid}/integrations/codex/

Request

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

Path parameters

uuidstring required

Request body

Response

The account is connected.

status'connected' | 'reauth_required' | 'not_connected' required
  • connected - Connected
  • reauth_required - Reauth Required
  • not_connected - Not Connected
plan_typestring nullable

The ChatGPT plan type OpenAI reports for the account.

emailstring email nullable

The email of the connected ChatGPT account.

connected_atstring date-time nullable

When the account was connected.

Changes

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