Skip to main content
GET
/
api
/
late
/
connect
Initiate OAuth connection for a social account
curl --request GET \
  --url https://app.puffle.ai/api/late/connect \
  --header 'Authorization: Bearer <token>'
{ "connectUrl": "https://getlate.dev/oauth/linkedin?state=abc123&redirect=https://app.puffle.ai/api/late/callback?platform=linkedin" }

Overview

Step 1 of the connect flow. Creates a new Late profile (or reuses profileId if supplied), then exchanges the target platform for a hosted OAuth URL. Redirect the human’s browser to the returned connectUrl. After they authorize, the platform redirects them to /api/late/callback?platform=<platform> (handled by lateOauthCallback), which syncs the new account into social_accounts and bounces back to /profile?tab=socials. Supported platforms: twitter, linkedin.

AI agent notes

Human-in-the-loop required. An AI agent cannot complete this flow headlessly — the OAuth consent screen must be rendered to a real browser with a real user session. Agents should:
  1. Call this endpoint to obtain connectUrl
  2. Surface the URL to the human and ask them to open it
  3. Wait (out of band) for the human to finish; then call listSocialAccounts or listLateAccounts to detect the new connection
createNew gotcha — pass as a string "true" (query param), not a boolean. Any other value is treated as false.Error surfacing — validation errors (invalid platform, bad profileId) return 400 with a human-readable error field. The Late API itself never returns 400 here — that would be a 500.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

platform
enum<string>
required

Which platform to initiate OAuth for. Required.

Available options:
twitter,
linkedin
profileId
string<uuid>

Optional. Attach the new connection to this existing user_profiles row. Omit or pair with createNew=true to create a fresh Late profile.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
createNew
string

Pass "true" (string) to force creation of a new Late profile even if profileId is supplied. Any other value is treated as false.

Response

OAuth URL issued. Redirect the user's browser to it.

connectUrl
string<uri>
required

Hosted OAuth URL to redirect the human to. The flow lands back at /api/late/callback?platform=<platform>, which then redirects to /profile?tab=socials.