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:
- Call GET /pending/:sessionToken to get available pages
- User selects which pages to connect
- Call this endpoint with the selected page IDs
- Social accounts are created and returned
Note: The session is automatically deleted after successful finalization.
POST
/v1/social-accounts/pending/{sessionToken}/finalizePath Parameters
sessionTokenstring
selectedPageIdsarray<string>
Array of page IDs to connect
Items
1 <= itemsResponse 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"
}