Skip to main content
CLI:
puffle composio connect --toolkit <toolkit>

Overview

Returns a one-time hosted Reddit OAuth URL that the user must open in a browser to grant Puffle access to their Reddit account. Reddit’s consent screen handles the login, MFA, and authorization grant — none of which can be completed headlessly. This endpoint also stages a pending row in accounts keyed by the returned connectedAccountId. The row is promoted to connected once the user finishes consent. Completion is detected by polling POST /api/composio/sync. The redirectUrl expires at the expiresAt timestamp returned with the response.

AI agent notes

Cannot be completed autonomously. The redirectUrl in the response MUST be opened in a human-operated browser. Reddit blocks headless logins. The typical pattern for an AI agent:
  1. Call this endpoint with { "toolkit": "reddit" }.
  2. Surface the redirectUrl to the human and ask them to complete the flow.
  3. Poll POST /api/composio/sync every 3–5 s until the response contains the account with status: "connected" (or call GET /api/senders?type=reddit and look for the new row).
  4. The account’s provider_account_id on that row matches the connectedAccountId returned here; it identifies the Reddit sender for internal Reddit automation.
Stale pending rows. Calling connect twice in a row is safe — each call upserts on (user_id, toolkit, provider_account_id) so a fresh connectedAccountId always lands its own row. Old pending rows from abandoned flows are harmless and will be cleaned up by the next disconnect.Expiration. If the user doesn’t complete the flow before expiresAt, call this endpoint again for a fresh URL.Reddit accounts don’t power campaigns. Today, Reddit senders are only used by internal Reddit automation. They do not appear in campaign sender lists.