Skip to main content
CLI:
puffle unipile connect

Overview

Returns a one-time hosted URL that the user must open in a browser to complete LinkedIn OAuth. LinkedIn login, MFA, and consent cannot be completed headlessly. Once the user finishes the hosted flow, Puffle receives a connection-status callback which:
  • Creates the row in accounts with type='linkedin'
  • Links it to the user via the pending_unipile_connections handshake (keyed by user_id)
  • Flips status to connected
The generated URL expires 1 hour after issuance.

AI agent notes

Cannot be completed autonomously. The url field in the response MUST be opened in a human-operated browser. LinkedIn blocks headless logins. The typical pattern for an AI agent:
  1. Call this endpoint.
  2. Surface the url to the human and ask them to complete the flow.
  3. Poll GET /api/senders?type=linkedin every 10–20 s — when a new row appears with status: "connected", the link is live.
  4. The account’s provider_account_id on that row identifies the LinkedIn sender for downstream campaign operations.
Stale pending rows. The route deletes any prior pending_unipile_connections entry for this user before inserting a fresh one, so calling connect twice in a row is safe — the most recent call wins.Expiration. If the user doesn’t complete the flow within 1 hour, call this endpoint again for a fresh URL.Premium detection is automatic. When the callback creates the row, is_premium / has_sales_navigator / weekly limits are derived from the connected account payload. If the user upgrades LinkedIn later, wait for the scheduled sender-status sync to pick up the new limits.