Social Accounts Setup
Manage connected social media accounts, list linked platforms, initiate OAuth flows, and disconnect accounts programmatically. This quick-start walks you through authentication, retrieving your connected accounts, and managing the OAuth lifecycle.
Prerequisites
Before making your first Social Accounts call, confirm you have:
- A GoHighLevel sub-account with at least one social media account connected (or permission to connect one)
- Access to Settings > Integrations > Private Integrations in your sub-account
- A REST client such as Postman, Insomnia, or
curlin your terminal - Your sub-account’s
locationId(found in Settings > Business Profile) - Admin-level permissions in GHL to manage social integrations
Set Up Authentication
All Social Accounts endpoints require a Private Integration Token (PIT) with the social-media-posting scope.
Navigate to Settings > Integrations > Private Integrations. Click Create New Integration, name it “Social Accounts API,” and enable the social-media-posting scope. Click Save and copy the generated token.
Pass this token in the Authorization header of every request as a Bearer token. Set your base URL to https://services.leadconnectorhq.com. Include the Version: 2021-07-28 header.
Make Your First Call
Start by listing all connected social accounts. Send a GET request to /social-media-posting/accounts:
GET /social-media-posting/accounts?locationId=your-location-id
Authorization: Bearer {your-pit-token}
This returns all connected accounts across Facebook, Instagram, Twitter, LinkedIn, Google Business Profile, and TikTok. Each account object includes the id, platform, name, and connection status.
To get accounts for a specific platform, use GET /social-media-posting/accounts/{platform} where {platform} is one of facebook, instagram, twitter, linkedin, gmb, or tiktok.
To initiate an OAuth connection, call POST /social-media-posting/oauth/start with the target platform and a callback URL. This returns an authorization URL to redirect users to. To disconnect an account, send DELETE /social-media-posting/account/{id}.
Handle the Response
A successful GET /social-media-posting/accounts call returns a 200 status with an array of account objects:
{
"accounts": [
{
"id": "acct-123",
"platform": "facebook",
"name": "My Business Page",
"status": "active",
"avatar": "https://...",
"connectionDate": "2026-01-15T08:00:00Z"
}
]
}
Check the status field for each account. A value of "active" means the OAuth token is valid. If status shows "expired" or "disconnected", the account needs to be re-authorized through the OAuth flow.
Common errors: 401 means your PIT is invalid. 404 on a platform-specific endpoint means no accounts are connected for that platform. 400 on OAuth start means the platform or callback URL is invalid.
Test Your Setup
Run through this checklist to confirm everything works:
- List all accounts with
GET /social-media-posting/accountsand verify your connected platforms appear - Filter by platform — call
GET /social-media-posting/accounts/facebookand confirm only Facebook accounts return - Check status — verify each account shows
"active"status - Test OAuth — call
POST /social-media-posting/oauth/startwith a test platform to confirm the authorization URL is generated - Cross-reference the API results with what you see in Settings > Social Media in the GHL dashboard
If an account shows expired status, re-authorize it through the OAuth flow or directly in the GHL dashboard before attempting to post through that account.
Next Steps
Read the full Social Accounts Guide for advanced OAuth management and multi-location account strategies. From here, explore Social Post CRUD for creating posts on connected accounts and Social Categories for organizing your content library.