Finalize pending connection

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

Authentication: This endpoint uses the session token from the URL path for authentication instead of API keys.

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.

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

Path Parameters

sessionTokenstring
selectedPageIdsarray<string>

Array of page IDs to connect

Items1 <= items

Response Body

curl -X POST "https://api.outstand.so/v1/social-accounts/pending/string/finalize" \  -H "Content-Type: application/json" \  -d '{    "selectedPageIds": [      "abc123",      "org456"    ]  }'
{
  "success": true,
  "connectedAccounts": [
    {
      "id": "9dyJS",
      "nickname": "johndoe",
      "username": "johndoe",
      "network": "linkedin",
      "accountType": "personal"
    }
  ]
}
{
  "success": false,
  "error": "Session expired or invalid"
}
{
  "success": false,
  "error": "Session expired or invalid"
}
{
  "success": false,
  "error": "Internal server error",
  "message": "Database connection failed"
}