Connect
Start OAuth Connect
Returns the platform URL where the user authorizes the connection. Send redirectUrl when you call with an API key.
x-api-key<token>Workspace API key, sent in the x-api-key header. Keys start with op_ and are created in the dashboard.
platform*string1 <= lengthredirectUrl?stringWhere the browser returns after authorization. Required when you call with an API key.
reconnect?stringId of an existing connection to re-authorize. Reconnecting does not use a plan slot.
profile?stringProfile to file the new connection under. It is created if it does not exist. When omitted, the workspace default profile is used. Ignored on reconnect.
length <= 60headless?stringSet to true to skip the hosted account picker. The browser then returns to redirectUrl with a tempToken, and you finish the connect with the select endpoint. Applies to Facebook and to Instagram through Facebook Login. Requires redirectUrl.
loginMethod?stringHow to connect an Instagram account. Defaults to instagram_login. Use facebook_login for an account linked to a Facebook Page, which adds a step to choose the account.
"instagram_login""facebook_login"Authorization URL
application/json- response
url*stringuriimport { Configuration, ConnectionsApi } from "@onepostly/sdk";const connectionsApi = new ConnectionsApi( new Configuration({ apiKey: process.env.ONEPOSTLY_API_KEY }));const response = await connectionsApi.startOAuth({ platform: "x", redirectUrl: "https://app.onepostly.com/connections/callback", profile: "Business",});console.log(response);{ "url": "https://x.com/i/oauth2/authorize?response_type=code&client_id=YOUR_CLIENT_ID&state=abc123"}Connect Bluesky via App Password
Connects a Bluesky account with its handle and an App Password. Create the App Password in Bluesky under Settings, App Passwords.
List Facebook Pages for Pending Connect
Lists the Facebook Pages the user can connect after authorizing Facebook. Send the tempToken returned to your redirect URL.