ghl_social_attach_oauth_accounts
Connect a selected social media account to your location after OAuth authentication, completing the 3-step OAuth flow for platforms like Facebook, Instagram, LinkedIn, and more.
Instructions
Connect Account (Step 3 of 3)
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 by Platform
The request body structure varies depending on the platform:
Facebook / Instagram
{
"type": "page",
"originId": "244405XXXXX11687",
Endpoint: POST /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId} (Version header: v3; source: v3/social-planner-v3.json)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Account details to connect. The structure varies by platform - see description above for examples. | |
| platform | Yes | Social media platform (must match the platform used in Steps 1 and 2) | |
| accountId | Yes | The OAuth Account ID received from Step 1 (same as used in Step 2) | |
| locationId | Yes | The Location ID where you want to connect this social account |