Connect
Select Candidate
Connects the chosen candidate and finishes the connect session.
POST
Bearerheader
AuthorizationBearer <op_>Workspace API key, sent as Authorization: Bearer op_... Keys are created in the dashboard.
sessionId*stringThe connectSession value your redirect URL received.
Length
1 <= lengthIdempotency-Key?stringA unique key, such as a UUID, that makes retrying this request safe. A repeat with the same key and body within 24 hours returns the first response instead of acting again. A 429 or 5xx response is not kept, so a retry with the same key runs again.
Length
1 <= length <= 255application/json- body
candidateId*stringid of a candidate from List Candidates.
Length
1 <= lengthredirectUrl?stringOverrides the session's redirectUrl for the final redirect.
Format
uriConnected account
application/json- response
account*redirectUrl*stringWhere to send the browser next.
Format
uriExample Request
import { Configuration, ConnectApi } from "@onepostly/sdk";const connectApi = new ConnectApi( new Configuration({ accessToken: process.env.ONEPOSTLY_API_KEY }));const response = await connectApi.selectConnectCandidate({ sessionId: "CONNECT_SESSION", selectConnectCandidateBody: { "candidateId": "123456789012345" },});console.log(response);Example Response
{ "account": { "id": "acc_1699f4157fb643f49d2ac447491f3204", "platform": "facebook", "displayName": "Your Brand", "handle": "yourbrand", "avatarUrl": "https://cdn.onepostly.com/avatars/yourbrand.jpg", "status": "active", "canAutoRenew": true, "tokenExpiresAt": "2027-05-14T10:00:00.000Z", "profile": "Business", "metadata": { "userId": "user_8412" }, "createdAt": "2027-03-15T09:00:00.000Z", "updatedAt": "2027-03-15T09:00:00.000Z" }, "redirectUrl": "https://yourapp.com/oauth/onepostly?connected=facebook&count=1&accountId=acc_1699f4157fb643f49d2ac447491f3204&handle=yourbrand"}