Sync Reddit Connection Status
Senders
Sync Reddit Connection Status
Sync Reddit Connection Status
POST
Sync Reddit Connection Status
CLI:
Overview
Reconciles unsettledaccounts rows for the caller against the live Reddit connection state. This endpoint does not start an OAuth connection. A signed-in human must first open Senders in the Puffle dashboard, click Connect for Reddit, and complete the provider authorization in the browser.
For each unsettled row this endpoint:
- Reads the connection status from the provider (
ACTIVE→connected,INITIATED/PENDING→ stayspending,REVOKED/INACTIVE→disconnected,FAILED/EXPIRED→error). - When the row flips to
connected, fetches the Reddit username and avatar (best-effort) and writes them todisplay_name,profile_url, andavatar_url. - Idempotent: rows that are already fully settled (connected with a display name) are skipped.
AI agent notes
Public API boundary.
/api/composio/connect is private, session-oriented integration plumbing and is not a supported public API workflow. An API-key agent must not call or guess that route. Ask the human to begin the connection in the dashboard, then use this endpoint only to observe an already-staged connection.Polling cadence. After the human confirms that the browser authorization is open, poll every 3–5 seconds for up to 2 minutes. Then stop and ask the human whether authorization completed; do not poll indefinitely. If they are still working and explicitly ask you to continue, poll no more than every 30 seconds for one additional 2-minute window, then stop and require fresh confirmation again.Detecting completion. The response always returns 200, even when nothing changed. Either:- Inspect
synced[]for an entry withstatus: "connected", or - Re-fetch
GET /api/senders?type=redditand look for a row whosestatusisconnectedanddisplay_nameis non-null.
status: "disconnected" to the row. The UI shows it as disconnected; the row sticks around for audit. Remove it from the dashboard if the human wants the disconnected row cleaned up entirely.No-op safety. Calling this when nothing is pending returns { "synced": [] }. An empty response does not extend the polling budget; follow the cadence and confirmation limits above.Errors. On 401, stop and request a valid API key. On a persistent 500, stop polling and surface the failure; do not attempt to recreate or disconnect the integration through undocumented routes.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Returns one entry per unsettled accounts row that was inspected. An empty synced array means nothing was pending. The same shape is returned whether or not any rows actually changed status — diff against GET /api/senders?type=reddit to detect new completions.
One entry per accounts row that was inspected. Rows that are already settled (connected with a display name) are not returned.