ghl_social_get_oauth_accounts
Retrieves available social media pages, channels, or locations after OAuth authentication so you can choose which account to connect.
Instructions
Get Available Accounts (Step 2 of 3)
OAuth Connection Flow - Step 2: Get Available Accounts
After completing OAuth authentication (Step 1), use this endpoint to retrieve the list of available pages, channels, or locations that can be connected.
OAuth Flow Position
Start OAuth → User authenticates, returns
accountIdGet Accounts (this endpoint) → Lists available pages/channels to connect
Attach Account → Connect the selected account
What This Returns
The response varies by platform:
Platform | Returns |
List of Facebook Pages the user manages | |
List of Instagram Professional Accounts (linked to Facebook Pages) | |
Google Business Profile locations | |
LinkedIn Pages and Profile | |
tiktok | TikTok Creator account info |
tiktok-business | TikTok Business Center accounts |
youtube | YouTube Channels |
Pinterest Business accounts and boards | |
threads | Threads profiles |
Next Step
From the response, select the account/page you want to connect and use its details in Step 3:
POST /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}Endpoint: GET /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId} (Version header: v3; source: v3/social-planner-v3.json) Requires a Sub-Account (location) token. OAuth scopes: socialplanner/oauth.readonly
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Search term to filter accounts/pages by name. Useful when the user has many pages to choose from. | |
| platform | Yes | Social media platform. Must match the platform used in the preceding steps of the OAuth flow. | |
| accountId | Yes | The OAuth Account ID received from Step 1 (Start OAuth) via the window message event | |
| locationId | Yes | The Location ID where you want to connect this social account |