Generate a hosted OAuth URL so the user can link their LinkedIn account through Unipile.
AccountStatus webhook to /api/webhooks/unipile which:
accounts with type='linkedin'pending_unipile_connections handshake (keyed by user_id)status to connectedurl field in the response MUST be opened in a human-operated browser. LinkedIn blocks headless logins. The typical pattern for an AI agent:url to the human and ask them to complete the flow.GET /api/unipile/accounts every 10–20 s — when a new row appears with status: "connected", the link is live.provider_account_id on that row is what you pass to searchUnipile, refreshUnipileAccount, or reconnectUnipileAccount later.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 webhook creates the row, is_premium / has_sales_navigator / weekly limits are derived from Unipile’s account payload. If the user upgrades LinkedIn later, call refreshUnipileAccount to pick up the new limits without re-auth.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Hosted auth URL created. Redirect the user here to complete LinkedIn OAuth.
Hosted Unipile auth URL. Redirect the user's browser here to complete LinkedIn OAuth. Expires 1 hour after creation.