Skip to main content
Connect

Get OAuth URL for a platform

Initiates an OAuth connection flow. By default, PostPeer hosts any required account selection UI and then returns the user to redirectUri. For LinkedIn custom account-selection UI, pass headless=true; if selection is required, the callback redirects to redirectUri with status=selection_required, platform=linkedin, and selectionToken.

GET/v1/connect/{platform}

Authorization

accessKey
x-access-key<token>

In: header

Path Parameters

platform*string
Value in"twitter" | "instagram" | "youtube" | "tiktok" | "pinterest" | "linkedin" | "bluesky" | "facebook" | "threads" | "googlebusiness"

Query Parameters

redirectUri?string

Final URL to redirect to after the connection completes. In headless mode, this URL also receives selection status query parameters when customer-owned account selection is required.

Formaturi
cancelRedirectUri?string

URL to redirect to when the user cancels or denies the OAuth prompt. Falls back to redirectUri when omitted.

Formaturi
headless?boolean

When true, platforms that require account selection redirect back to redirectUri with a short-lived selectionToken so you can build your own selection UI. When false, PostPeer hosts the selection UI.

Defaultfalse
profileId?string

Profile to associate the resulting integration with. Must belong to the same project. Omit to connect without a profile.

appId?string

Connect under your own OAuth app (Bring Your Own Keys). Pass the id of an OAuth app created via /v1/apps for this same platform. Omit to use postpeer's system app.

Response Body

application/json

application/json

curl -X GET "https://example.com/v1/connect/twitter"
{
  "url": "string"
}
{
  "error": "string"
}