Connect Account (Step 3 of 3)
POST/social-media-posting/oauth/:locationId/:platform/accounts/:accountId
OAuth Connection Flow - Step 3: Connect the Account
This is the final step in the OAuth flow. After retrieving available accounts (Step 2), use this endpoint to connect the selected account to your location.
OAuth Flow Summary
- Start OAuth → User authenticates with platform
- Get Accounts → Retrieved available pages/channels
- Attach Account (this endpoint) → Connect the selected account
Request Body
The accepted fields depend on the platform path parameter — pick the matching schema in the request body below. Most platforms take the originId, name and optional avatar of the account you selected in Step 2; Google Business Profile takes the full location and account objects.
tiktok-businessaccounts are connected through the TikTok Business flow, not this endpoint.
After Connection
Once connected, the account will appear in your location's connected accounts and can be used for social media posting.
Request
API Version
v3Social media platform. Must match the platform used in the preceding steps of the OAuth flow.
googlefacebookinstagramthreadsblueskylinkedintiktoktiktok-businessyoutubepinterestThe Location ID where you want to connect this social account
The OAuth Account ID received from Step 1 (Start OAuth) via the window message event
- application/json
- Body
- Example (auto)
Bodyrequired
The account to connect. The accepted fields depend on the platform path parameter.
- oneOf
- Google Business Account
- Threads
- Bluesky
- Tiktok
- YouTube
Type of Facebook account (must be page)
pagegroupprofilelocationbusinessOriginal Facebook platform identifier
Name of the Facebook page or account
Avatar or profile picture URL
{
"type": "page",
"originId": "244405****11687",
"name": "JOHN_DEO",
"avatar": "https://storage.googleapis.com/2ad21ebc23/test"
}
Successful response - Account attached. Response structure varies by platform.
- application/json
- Schema
- Example (auto)
Schema
- oneOf
- Tiktok Business
- Google Business Account
- Threads
- YouTube
- Tiktok
- Bluesky
Whether the Facebook page was successfully attached to the requesting location
Status Code
Human-readable message confirming the account was attached
The connected account record created (or updated) for the page that was just attached.
{
"success": true,
"statusCode": 201,
"message": "Added Facebook Account",
"results": {
"_id": "65f2d989a4f2f1e5322c3856",
"oAuthId": "u37swmmLbA02zgqKPpxITe2",
"locationId": "u37swmmLbA02zgqKPpxITe2",
"platform": "facebook",
"type": "page",
"name": "Account Name",
"active": true
}
}