Finalize pending connection

Complete the OAuth connection by selecting which pages/accounts to connect.

Complete the OAuth connection by selecting which pages/accounts to connect. This endpoint creates the social account records for the selected pages.

Authentication: Requires your API key, and the session token must belong to the same organization as that key. A session token from another organization is rejected as if it had expired. Call this from your backend.

Flow:

  1. Call GET /pending/:sessionToken to get available pages
  2. User selects which pages to connect
  3. Call this endpoint with the selected page IDs
  4. Social accounts are created and returned

Note: The session is automatically deleted after successful finalization.

Permissions: Requires accounts:connect. Access is limited by the API key creator's current organization membership and stored key ceiling. See Organization permissions. Replacing an existing account additionally requires accounts:reconnect; changing its tenant additionally requires accounts:assign_tenant.

POST
/v1/social-accounts/pending/{sessionToken}/finalize

Path Parameters

sessionToken*string

Request Body

application/json
  1. body

Request body for finalizing connection

selectedPageIds*array<string>

Array of page IDs to connect

Items1 <= items

Response Body

Connection finalized successfully

application/json
  1. response

Response after successfully finalizing connection

success*boolean
connectedAccounts*array<>
Example Request
curl -X POST 'https://api.outstand.so/v1/social-accounts/pending/string/finalize' \  -H 'Content-Type: application/json' \  -d '{  "selectedPageIds": [    "string"  ]}'
Example Response
{  "success": true,  "connectedAccounts": [    {      "id": "string",      "nickname": "string",      "username": "string",      "network": "string",      "accountType": "string"    }  ]}