HighLevel: Connect Account (Step 3 of 3)
HighLevel socialPlanner.attachOauthAccounts: arguments, response, policy and SDK examples.
← Social planner operations · Get started
Operation gohighlevel.attach_oauth_accounts
Provider route: POST /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”Install @alter-ai/sdk @alter-ai/gohighlevel with npm, or alter-sdk-gohighlevel with pip. Supply your connected customer’s grant ID and the arguments described below.
import { App } from "@alter-ai/sdk";import { HighLevelIntegration } from "@alter-ai/gohighlevel";
async function execute(input: Parameters<HighLevelIntegration["socialPlanner"]["attachOauthAccounts"]>[0]) { const app = new App({ apiKey: process.env.ALTER_API_KEY! }); try { const provider = new HighLevelIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! }); const call = await provider.socialPlanner.attachOauthAccounts(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom alter_sdk_gohighlevel import HighLevelIntegration
async def execute(arguments): async with App(api_key=os.environ["ALTER_API_KEY"]) as app: provider = HighLevelIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]}) call = await provider.social_planner.attach_oauth_accounts(arguments) result = await call.wait() return result.body_json()Referenced models: Connect Account (Step 3 of 3) — request body — body / type: page, Connect Account (Step 3 of 3) — request body — body account, location, Connect Account (Step 3 of 3) — request body — body avatar, name, origin Id, page Id, Connect Account (Step 3 of 3) — request body — body / type: page, group, profile, location, business — Attach Linkedin Account DTO, Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Pinterest Account DTO, Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Threads Account DTO, Connect Account (Step 3 of 3) — request body — body / type: page, group, profile, location, business — Attach Tiktok Account DTO, Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Youtube Account Response DTO
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
Referenced models: Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media FBAccount Response DTO, Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Gmb Account Response DTO, Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Linked In Account Response DTO, Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Pinterest Account Response DTO, Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Tiktok Account Response DTO, Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media You Tube Account Response DTO
Schemas
Section titled “Schemas”11 more schemas are linked from the tables above, on the schema pages.
Connect Account (Step 3 of 3) — request body — body / type: page
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Required within parent | Avatar or profile picture URL |
name | string | Required within parent | Name of the Facebook page or account |
originId | string | Required within parent | Original Facebook platform identifier |
type | string | Required within parent | Type of Facebook account (must be page) One of: page |
Connect Account (Step 3 of 3) — request body — body account, location
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
account | object | Required within parent | |
account (allOf 1) | Model | All variants apply | Expand Connect Account (Step 3 of 3) — request body — body account, location account account Name, name, type, verification State, vetted State |
location | object | Required within parent | |
location (allOf 1) | Model | All variants apply | Expand Connect Account (Step 3 of 3) — request body — body account, location location is Connected, is Verified, max Location, metadata, name, store Code, storefront Address, title |
Referenced models: Connect Account (Step 3 of 3) — request body — body account, location account account Name, name, type, verification State, vetted State, Connect Account (Step 3 of 3) — request body — body account, location location is Connected, is Verified, max Location, metadata, name, store Code, storefront Address, title
Connect Account (Step 3 of 3) — request body — body avatar, name, origin Id, page Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Optional | Avatar or profile picture URL |
name | string | Optional | Display name of the account |
originId | string | Optional | Original platform-specific account identifier |
pageId | string | Required within parent | Facebook page ID associated with the Instagram account |
Connect Account (Step 3 of 3) — request body — body / type: page, group, profile, location, business — Attach Linkedin Account DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Required within parent | Avatar or profile picture URL |
name | string | Required within parent | Name of the LinkedIn page or profile |
originId | string | Required within parent | Original LinkedIn platform identifier |
type | string | Required within parent | Type of LinkedIn account (must be one of: page, profile) One of: page, group, profile, location, business |
urn | string | Required within parent | LinkedIn URN (Uniform Resource Name) identifier |
Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Pinterest Account DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Optional | Avatar URL |
companyId | string | Optional | Company ID |
name | string | Optional | Name |
originAccountType | string | Optional | Origin account type |
originId | string | Required within parent | Origin ID |
type | string | Optional | Account type must be one of the following values: profile One of: profile |
username | string | Optional | Username |
verified | boolean | Optional | Verification status |
websiteUrl | string | Optional | Website URL |
Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Threads Account DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Required within parent | Avatar URL |
name | string | Required within parent | Account name |
originId | string | Required within parent | Origin ID |
type | string | Required within parent | Account type One of: profile |
Connect Account (Step 3 of 3) — request body — body / type: page, group, profile, location, business — Attach Tiktok Account DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Required within parent | Avatar or profile picture URL |
name | string | Required within parent | Display name of the account |
originId | string | Required within parent | Original platform-specific account identifier |
type | string | Required within parent | Type of TikTok account One of: page, group, profile, location, business |
username | string | Optional | Username or handle of the TikTok account |
verified | boolean | Optional | Indicates if the TikTok account is verified |
Connect Account (Step 3 of 3) — request body — body / type: profile — Attach Youtube Account Response DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Required within parent | Avatar URL |
name | string | Required within parent | Name |
originId | string | Required within parent | Origin ID |
type | string | Required within parent | Account type One of: profile |
username | string | Optional | Username |
verified | boolean | Optional | Verification status |
Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media FBAccount Response DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
message | string | Required within parent | Message |
results | JSON | Optional | Requested Results |
results (allOf 1) | Model | All variants apply | Expand Connect Account (Step 3 of 3) — response body — message, results, status Code, success results id, active, avatar, created At, deleted, location Id, meta, name, o Auth Id, old Id, origin Id, platform, type, updated At — Social Media Facebook Account Schema |
statusCode | JSON | Required within parent | |
statusCode (anyOf 1) | number | Alternative | Status Code |
statusCode (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
success | boolean | Required within parent | Success or Failure |
Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Gmb Account Response DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
message | string | Required within parent | Message |
results | JSON | Optional | Requested Results |
results (allOf 1) | Model | All variants apply | Expand Connect Account (Step 3 of 3) — response body — message, results, status Code, success results id, active, avatar, created At, deleted, location Id, meta, name, o Auth Id, old Id, origin Id, platform, type, updated At — Social Google Media Account Schema |
statusCode | JSON | Required within parent | |
statusCode (anyOf 1) | number | Alternative | Status Code |
statusCode (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
success | boolean | Required within parent | Success or Failure |
Connect Account (Step 3 of 3) — response body — message, results, status Code, success — Social Media Linked In Account Response DTO
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
message | string | Required within parent | Message |
results | JSON | Optional | Requested Results |
results (allOf 1) | Model | All variants apply | Expand Connect Account (Step 3 of 3) — response body — message, results, status Code, success results id, active, avatar, created At, deleted, location Id, meta, name, o Auth Id, old Id, origin Id, platform, type, updated At — Social Media Linked In Account Schema |
statusCode | JSON | Required within parent | |
statusCode (anyOf 1) | number | Alternative | Status Code |
statusCode (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
success | boolean | Required within parent | Success or Failure |
Connect Account (Step 3 of 3) — response body — message, results, statusCode, success / results / platform: youtube avatar, name, origin Id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
avatar | string | Optional | Account Avatar URL |
name | string | Required within parent | Account Name |
originId | string | Required within parent | Origin ID |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: gohighlevel.attach_oauth_accounts. Catalog operation: attach-oauth-accounts. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.
Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.
Pinned headers: {"Version": "v3"}