# Get Available Accounts (Step 2 of 3)

GET https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}

## 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

1. **Start OAuth** → User authenticates, returns `accountId`
2. **Get Accounts** (this endpoint) → Lists available pages/channels to connect
3. **Attach Account** → Connect the selected account

### What This Returns

The response varies by platform:

| Platform | Returns |
|----------|--------|
| **facebook** | List of Facebook Pages the user manages |
| **instagram** | List of Instagram Professional Accounts (linked to Facebook Pages) |
| **google** | Google Business Profile locations |
| **linkedin** | LinkedIn Pages and Profile |
| **tiktok** | TikTok Creator account info |
| **tiktok-business** | TikTok Business Center accounts |
| **youtube** | YouTube Channels |
| **pinterest** | 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}
```

## Authentication

Send `Authorization: Bearer <token>` using:

- **Sub-Account token: OAuth access token or Private Integration Token.** Scopes: `socialplanner/oauth.readonly`

## Parameters

### Header Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `Version` | string | Yes | API Version |

### Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `platform` | string | Yes | Social media platform. Must match the platform used in the preceding steps of the OAuth flow. |
| `locationId` | string | Yes | The Location ID where you want to connect this social account |
| `accountId` | string | Yes | The OAuth Account ID received from Step 1 (Start OAuth) via the window message event |

### Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `search` | string | No | Search term to filter accounts/pages by name. Useful when the user has many pages to choose from. |

## OpenAPI Specification

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "LeadConnector API",
    "version": "v3"
  },
  "servers": [
    {
      "url": "https://services.leadconnectorhq.com"
    }
  ],
  "paths": {
    "/social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}": {
      "get": {
        "summary": "Get Available Accounts (Step 2 of 3)",
        "operationId": "getAvailableAccountsStep2Of3",
        "description": "## OAuth Connection Flow - Step 2: Get Available Accounts\n\nAfter completing OAuth authentication (Step 1), use this endpoint to retrieve the list of available pages, channels, or locations that can be connected.\n\n### OAuth Flow Position\n\n1. **Start OAuth** → User authenticates, returns `accountId`\n2. **Get Accounts** (this endpoint) → Lists available pages/channels to connect\n3. **Attach Account** → Connect the selected account\n\n### What This Returns\n\nThe response varies by platform:\n\n| Platform | Returns |\n|----------|--------|\n| **facebook** | List of Facebook Pages the user manages |\n| **instagram** | List of Instagram Professional Accounts (linked to Facebook Pages) |\n| **google** | Google Business Profile locations |\n| **linkedin** | LinkedIn Pages and Profile |\n| **tiktok** | TikTok Creator account info |\n| **tiktok-business** | TikTok Business Center accounts |\n| **youtube** | YouTube Channels |\n| **pinterest** | Pinterest Business accounts and boards |\n| **threads** | Threads profiles |\n\n### Next Step\n\nFrom the response, select the account/page you want to connect and use its details in Step 3:\n```\nPOST /social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}\n```",
        "parameters": [
          {
            "name": "platform",
            "required": true,
            "in": "path",
            "description": "Social media platform. Must match the platform used in the preceding steps of the OAuth flow.",
            "schema": {
              "example": "facebook",
              "enum": [
                "google",
                "facebook",
                "instagram",
                "threads",
                "bluesky",
                "linkedin",
                "tiktok",
                "tiktok-business",
                "youtube",
                "pinterest"
              ],
              "type": "string"
            }
          },
          {
            "name": "locationId",
            "required": true,
            "in": "path",
            "description": "The Location ID where you want to connect this social account",
            "schema": {
              "example": "w37swmmLbA02zgqKPpxITe2",
              "type": "string"
            }
          },
          {
            "name": "accountId",
            "required": true,
            "in": "path",
            "description": "The OAuth Account ID received from Step 1 (Start OAuth) via the window message event",
            "schema": {
              "example": "w37swmmLbA02zgqKPpxITe",
              "type": "string"
            }
          },
          {
            "name": "search",
            "required": false,
            "in": "query",
            "description": "Search term to filter accounts/pages by name. Useful when the user has many pages to choose from.",
            "schema": {
              "example": "page name",
              "type": "string"
            }
          },
          {
            "name": "Version",
            "in": "header",
            "description": "API Version",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "v3"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Returns available accounts/pages/channels that can be connected. Response structure varies by platform - see examples below.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetAvailableAccountsStep2Of3Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BadRequestDTO"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnauthorizedDTO"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnprocessableDTO"
                }
              }
            }
          }
        },
        "security": [
          {
            "Location-Access": [
              "socialplanner/oauth.readonly"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.",
        "type": "http"
      },
      "Location-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Sub-Account.",
        "type": "http"
      },
      "Agency-Access": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.",
        "type": "http"
      },
      "Agency-Access-Only": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "name": "Authorization",
        "in": "header",
        "description": "Use the Access Token generated with user type as Agency.",
        "type": "http"
      }
    },
    "schemas": {
      "GetAvailableAccountsStep2Of3Response": {
        "oneOf": [
          {
            "title": "Facebook",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the page lookup completed without an upstream API error",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Facebook Account"
              },
              "results": {
                "description": "The Facebook Pages available to connect. See `GetFacebookAccountsSchema` for the full field breakdown.",
                "example": {
                  "pages": [
                    {
                      "id": "u37swmmLbA02zgqKPpxITe2",
                      "name": "FB Page",
                      "isOwned": true,
                      "isConnected": false
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "pages": {
                        "description": "Facebook Pages the authenticated user manages and either owns or can post to (`CREATE_CONTENT` task). Always an array — empty when the user has no eligible pages, or when the lookup failed (see `success`/`error` below). Optionally filtered by the `search` query parameter on the request.",
                        "example": [
                          {
                            "id": "u37swmmLbA02zgqKPpxITe2",
                            "name": "FB Page",
                            "avatar": "https://graph.facebook.com/1234567890/picture",
                            "isOwned": true,
                            "isConnected": false
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Facebook page identifier",
                              "example": "u37swmmLbA02zgqKPpxITe2"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of the Facebook page",
                              "example": "FB Page"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "Page picture URL from Facebook's `picture` field; absent if Facebook did not return one.",
                              "example": "https://graph.facebook.com/1234567890/picture"
                            },
                            "isOwned": {
                              "type": "boolean",
                              "description": "Facebook's `is_owned` flag — true when the authenticated user is the Business Manager owner of this page, as opposed to only having a task-based role on it.",
                              "example": true
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this page's ID is already among the location's connected Facebook accounts — computed by this API, not returned by Facebook.",
                              "example": true
                            },
                            "isCreatorTask": {
                              "type": "boolean",
                              "description": "True when the authenticated user has the `CREATE_CONTENT` task permission on this page. Only present when this list was served from the background-fetched page cache rather than fetched live; absent otherwise.",
                              "example": true
                            }
                          },
                          "title": "FacebookPageSchema"
                        }
                      },
                      "success": {
                        "type": "boolean",
                        "description": "False when the Facebook Graph API call failed; omitted entirely on a successful call. The response envelope's top-level `success` is also set to false in that case.",
                        "example": false
                      },
                      "error": {
                        "type": "object",
                        "description": "Populated only when `success` is false — a generic, retry-safe error summary (never the raw upstream Facebook error). `code` is always `FACEBOOK_API_ERROR`.",
                        "example": {
                          "message": "Failed to get facebook accounts. Please try again later.",
                          "code": "FACEBOOK_API_ERROR"
                        }
                      }
                    },
                    "title": "GetFacebookAccountsSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Tiktok Business",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 201
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Tiktok Business Account"
              },
              "results": {
                "description": "The TikTok account available to connect for this OAuth account. Used for both the tiktok and tiktok-business platforms — both route through the same TikTok Business API lookup.",
                "example": {
                  "profile": [
                    {
                      "id": "7401982639320318982",
                      "name": "Account Name",
                      "username": "user_name",
                      "avatar": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg",
                      "verified": true,
                      "isConnected": true,
                      "type": "business",
                      "isBusinessAccount": true
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "The TikTok account available to connect. A single-element array — TikTok OAuth authenticates exactly one account per connection, whether it is a personal creator account (tiktok) or a Business Center account (tiktok-business). Empty array when the profile could not be fetched.",
                        "example": [
                          {
                            "id": "7401982639320318982",
                            "name": "Account Name",
                            "username": "user_name",
                            "avatar": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg",
                            "verified": true,
                            "isConnected": true,
                            "type": "business",
                            "isBusinessAccount": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The TikTok user's open_id, scoped to this app. Send this value back as originId when calling Attach Account.",
                              "example": "7401982639320318982"
                            },
                            "name": {
                              "type": "string",
                              "description": "Display name of the TikTok account.",
                              "example": "Account Name"
                            },
                            "username": {
                              "type": "string",
                              "description": "@handle of the TikTok account.",
                              "example": "user_name"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "URL of the account's profile image, as returned by TikTok.",
                              "example": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg"
                            },
                            "verified": {
                              "type": "boolean",
                              "description": "True when TikTok has verified the account. For a profile (personal creator) account this reflects the caller's own longUploadsStatus; for a business account it is only filled in once the profile is matched to an already-connected account, so it can be absent on a first-time business connect.",
                              "example": true
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this profile is already attached to the location as a connected account.",
                              "example": true
                            },
                            "type": {
                              "type": "string",
                              "description": "'profile' for a personal TikTok creator login (tiktok platform) or 'business' for a TikTok Business Center login (tiktok-business platform).",
                              "enum": [
                                "profile",
                                "business"
                              ],
                              "example": "business"
                            },
                            "isBusinessAccount": {
                              "type": "boolean",
                              "description": "True when this profile was fetched through the TikTok Business API (a tiktok-business connect). Not present on profiles returned for the personal tiktok platform.",
                              "example": true
                            }
                          },
                          "title": "TiktokProfileSchema"
                        }
                      }
                    },
                    "title": "GetTiktokBusinessAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Google Business Account",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the location lookup completed without an upstream API error",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Google Business Account"
              },
              "results": {
                "description": "The Business Profile locations available to connect, plus reconnect/error context when applicable. See `GetGoogleLocationAccountSchema` for the full field breakdown.",
                "example": {
                  "locations": [
                    {
                      "location": {
                        "name": "locations/17909648580344584627",
                        "title": "Location Title"
                      },
                      "account": {
                        "name": "accounts/114659701071209971352",
                        "accountName": "Account Name Test"
                      }
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "locations": {
                        "description": "Every Business Profile location the authenticated Google user can manage, each paired with the account that owns it. Always an array — empty when the user has no locations, or when the lookup failed (see `success`/`error` below). Pick one entry and send its `location`/`account` pair as the Attach Account (Step 3) request body.",
                        "example": [
                          {
                            "location": {
                              "name": "locations/17909648580344584627",
                              "title": "Location Title",
                              "maxLocation": false,
                              "isVerified": true,
                              "isConnected": false
                            },
                            "account": {
                              "name": "accounts/114659701071209971352",
                              "accountName": "Account Name Test",
                              "type": "PERSONAL",
                              "verificationState": "UNVERIFIED",
                              "vettedState": "NOT_VETTED"
                            }
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "location": {
                              "description": "The Business Profile location for this entry in the `locations` array.",
                              "example": {
                                "name": "locations/17909648580344584627",
                                "storeCode": "STORE-001",
                                "title": "Location Title",
                                "maxLocation": false,
                                "isVerified": true,
                                "isConnected": false
                              },
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Business Profile location resource name, in the form `locations/{locationId}`. Pass it back as `location.name` in the Attach Account (Step 3) request body to connect this location.",
                                      "example": "locations/17909648580344584627"
                                    },
                                    "storeCode": {
                                      "type": "string",
                                      "description": "Merchant-assigned store code for this location, if one was set on Google Business Profile.",
                                      "example": "STORE-001"
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Business location title or name",
                                      "example": "Location Title"
                                    },
                                    "metadata": {
                                      "type": "object",
                                      "description": "Google-controlled attributes for this location as returned by the Business Profile API — e.g. `placeId` once Google has mapped the listing (used to compute `isVerified` below). Not editable by the caller.",
                                      "example": {
                                        "placeId": "ChIJsZQpj1qbXjkRQNDUG4UUx6k"
                                      }
                                    },
                                    "storefrontAddress": {
                                      "type": "object",
                                      "description": "Postal address of the location as returned by Google (address lines, locality, region code, etc.).",
                                      "example": {
                                        "addressLines": [
                                          "1600 Amphitheatre Pkwy"
                                        ],
                                        "locality": "Mountain View",
                                        "regionCode": "US"
                                      }
                                    },
                                    "relationshipData": {
                                      "type": "object",
                                      "description": "Google-reported relationships for this location, including `childrenLocations` when it is the parent of a multi-location chain. `maxLocation` below is derived from this.",
                                      "example": {
                                        "childrenLocations": []
                                      }
                                    },
                                    "maxLocation": {
                                      "type": "boolean",
                                      "description": "True when this location has 10 or more child locations listed in `relationshipData` (i.e. it heads a large chain). Computed from `relationshipData.childrenLocations.length`; Google does not return this flag directly.",
                                      "example": false
                                    },
                                    "isVerified": {
                                      "type": "boolean",
                                      "description": "True when Google has assigned this location a Place ID (`metadata.placeId`), meaning the listing is mapped and verified on Google Maps; false if unverified.",
                                      "example": true
                                    },
                                    "isConnected": {
                                      "type": "boolean",
                                      "description": "True when this location is already connected to the location making the request, determined by matching this location's ID against already-connected accounts — not a value Google returns.",
                                      "example": false
                                    }
                                  },
                                  "title": "GoogleLocationSchema"
                                }
                              ]
                            },
                            "account": {
                              "description": "The Business Profile account that owns the location above, paired with it for this entry.",
                              "example": {
                                "name": "accounts/114659701071209971352",
                                "accountName": "Account Name Test",
                                "type": "PERSONAL",
                                "verificationState": "UNVERIFIED",
                                "vettedState": "NOT_VETTED"
                              },
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "name": {
                                      "type": "string",
                                      "description": "Business Profile account resource name, in the form `accounts/{accountId}`. Returned as-is from Google's Accounts API alongside each location; pass it back as `account.name` in the Attach Account (Step 3) request body.",
                                      "example": "accounts/114659701071209971352"
                                    },
                                    "accountName": {
                                      "type": "string",
                                      "description": "Display name of the Google Business account",
                                      "example": "Account Name Test"
                                    },
                                    "type": {
                                      "type": "string",
                                      "description": "Google account type, e.g. `PERSONAL`, `LOCATION_GROUP` or `ORGANIZATION`. Passed through from Google's API unmodified.",
                                      "example": "PERSONAL"
                                    },
                                    "verificationState": {
                                      "type": "string",
                                      "description": "Google's verification state for the account, e.g. `VERIFIED` or `UNVERIFIED`.",
                                      "example": "UNVERIFIED"
                                    },
                                    "vettedState": {
                                      "type": "string",
                                      "description": "Google's vetting state for the account, e.g. `VETTED` or `NOT_VETTED`.",
                                      "example": "NOT_VETTED"
                                    }
                                  },
                                  "title": "GoogleAccountsSchema"
                                }
                              ]
                            }
                          },
                          "title": "GetGoogleLocationSchema"
                        }
                      },
                      "reconnectDetails": {
                        "description": "Only present when this response came from the \"get locations by request id\" polling flow (not the direct Get Accounts call). One entry per previously-connected location that needed re-authentication during the OAuth callback: `isConnected: true` if this login restored access automatically, or `error`/`helpMessage`/`helpUrl` if the user still lacks permission to that location and must pick a different one. Each entry also carries the location's native Google `originId`, which this shared reconnect schema does not list; note `error` is set as the literal boolean `true` on this platform, not a message string.",
                        "example": [
                          {
                            "_id": "65f2d989a4f2f1e5322c3856",
                            "id": "65f2d989a4f2f1e5322c3856_65f2d989a4f2f1e5322c3856",
                            "isConnected": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "accountId": {
                        "type": "string",
                        "description": "24-character hex identifier of the OAuth connection record this poll is for. Only present when this response came from the \"get locations by request id\" flow; echoes the `accountId` delivered by Start OAuth.",
                        "example": "65f2d989a4f2f1e5322c3856"
                      },
                      "account": {
                        "type": "object",
                        "description": "Always null. Present only when the Business Profile lookup failed (see `success`/`error` below); kept so the response shape stays consistent for callers even on failure.",
                        "example": null,
                        "nullable": true
                      },
                      "success": {
                        "type": "boolean",
                        "description": "False when the Google Business Profile lookup failed; omitted entirely on a successful call. The response envelope's top-level `success` is also set to false in that case.",
                        "example": false
                      },
                      "error": {
                        "type": "object",
                        "description": "Populated only when `success` is false — a generic, retry-safe error summary (never the raw upstream Google error). `code` is always `GOOGLE_API_ERROR`.",
                        "example": {
                          "message": "Failed to get google locations. Please try again later.",
                          "code": "GOOGLE_API_ERROR"
                        }
                      }
                    },
                    "title": "GetGoogleLocationAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Linkedin",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched LinkedIn Account"
              },
              "results": {
                "description": "LinkedIn pages and member profile available to connect for this OAuth account.",
                "example": {
                  "pages": [
                    {
                      "id": "80847980",
                      "name": "Sample Name",
                      "avatar": "https://media.licdn.com/dms/image/sample-page-logo.jpg",
                      "urn": "urn:li:organization:80847980",
                      "isConnected": true
                    }
                  ],
                  "profile": [
                    {
                      "id": "78945612",
                      "name": "Profile Name",
                      "avatar": "https://media.licdn.com/dms/image/sample-member-photo.jpg",
                      "urn": "urn:li:person:78945612",
                      "isConnected": true
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "pages": {
                        "description": "LinkedIn Pages the authenticated user administers. Always an array — empty when the user has no admin-level page access.",
                        "example": [
                          {
                            "id": "80847980",
                            "name": "Sample Name",
                            "avatar": "https://media.licdn.com/dms/image/sample-page-logo.jpg",
                            "urn": "urn:li:organization:80847980",
                            "isConnected": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Numeric LinkedIn organization ID for the page (the suffix of its urn). Send this value back as originId when calling Attach Account.",
                              "example": "80847980"
                            },
                            "name": {
                              "type": "string",
                              "description": "Display name of the LinkedIn Page, as returned by the LinkedIn API.",
                              "example": "Sample Name"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "URL of the page's logo image. Empty string when LinkedIn has no logo on file.",
                              "example": "https://media.licdn.com/dms/image/sample-page-logo.jpg"
                            },
                            "urn": {
                              "type": "string",
                              "description": "LinkedIn URN identifying the organization. Send this value back as urn when calling Attach Account.",
                              "example": "urn:li:organization:80847980"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this page is already attached to the location as a connected account.",
                              "example": true
                            }
                          },
                          "title": "LinkedInPageSchema"
                        }
                      },
                      "profile": {
                        "description": "The authenticated LinkedIn member. Always a single-element array — LinkedIn OAuth authenticates exactly one member per connection, and there is no way to list other members.",
                        "example": [
                          {
                            "id": "78945612",
                            "name": "Profile Name",
                            "avatar": "https://media.licdn.com/dms/image/sample-member-photo.jpg",
                            "urn": "urn:li:person:78945612",
                            "isConnected": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Numeric LinkedIn member ID for the authenticated user (the suffix of their urn).",
                              "example": "78945612"
                            },
                            "name": {
                              "type": "string",
                              "description": "Full name of the authenticated LinkedIn member.",
                              "example": "Profile Name"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "URL of the member's LinkedIn profile picture. Empty string when none is set.",
                              "example": "https://media.licdn.com/dms/image/sample-member-photo.jpg"
                            },
                            "urn": {
                              "type": "string",
                              "description": "LinkedIn URN identifying the member. Send this value back as urn when calling Attach Account.",
                              "example": "urn:li:person:78945612"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this profile is already attached to the location as a connected account.",
                              "example": true
                            }
                          },
                          "title": "LinkedInProfileSchema"
                        }
                      },
                      "reconnectDetails": {
                        "description": "Only populated when this schema is returned by the request-id polling endpoint (GET /oauth/linkedin/accounts) during a reconnect, never by the Get Accounts step. Lists the location's previously-connected pages/profiles: an entry with isConnected: true was reactivated under the freshly-authenticated user's token, while an entry carrying error/helpMessage belongs to a different LinkedIn user and still needs its original owner to reconnect.",
                        "example": [
                          {
                            "_id": "65f2d989a4f2f1e5322c3856",
                            "id": "65f2d989a4f2f1e5322c3856_65f2d989a4f2f1e5322c3856",
                            "error": "Token expired",
                            "helpMessage": "Reconnect this account to continue publishing."
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "accountId": {
                        "type": "string",
                        "description": "Local OAuth record ID for the connection that was just completed or reconnected. Only populated by the request-id polling endpoint (GET /oauth/linkedin/accounts), never by the Get Accounts step.",
                        "example": "65f2d989a4f2f1e5322c3856"
                      }
                    },
                    "title": "GetLinkedInAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Instagram",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Whether the account lookup completed without an upstream API error",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Instagram Account"
              },
              "results": {
                "description": "The Instagram Professional accounts available to connect, plus reconnect/error context when applicable. See `GetInstagramAccountsSchema` for the full field breakdown.",
                "example": {
                  "accounts": [
                    {
                      "id": "idu37swmmLbA02zgqKPpxITe2",
                      "name": "Insta account",
                      "avatar": "avau37swmmLbA02zgqKPpxITe2",
                      "pageId": "pidu37swmmLbA02zgqKPpxITe2",
                      "isConnected": true
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "accounts": {
                        "description": "Instagram Professional (Business/Creator) accounts the authenticated user can post to. Always an array — empty when the user has no eligible accounts, or when the lookup failed (see `success`/`error` below). Optionally filtered by the `search` query parameter on the request.",
                        "example": [
                          {
                            "id": "idu37swmmLbA02zgqKPpxITe2",
                            "name": "Insta account",
                            "avatar": "avau37swmmLbA02zgqKPpxITe2",
                            "pageId": "pidu37swmmLbA02zgqKPpxITe2",
                            "isConnected": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Instagram-scoped user ID — the Instagram Business/Creator account's own ID when linked through a Facebook Page, or the account's `user_id` when connected via direct Instagram login.",
                              "example": "idu37swmmLbA02zgqKPpxITe2"
                            },
                            "name": {
                              "type": "string",
                              "description": "Instagram username of the account",
                              "example": "Insta account"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "Profile picture URL from Instagram's `profile_picture_url` field.",
                              "example": "avau37swmmLbA02zgqKPpxITe2"
                            },
                            "pageId": {
                              "type": "string",
                              "description": "ID of the Facebook Page this Instagram account is linked to. Only present when the account was discovered through the Facebook-login flow; absent for accounts connected via direct Instagram login.",
                              "example": "pidu37swmmLbA02zgqKPpxITe2"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this account's ID is already among the location's connected Instagram accounts — computed by this API, not returned by Instagram.",
                              "example": true
                            }
                          },
                          "title": "InstagramAccountSchema"
                        }
                      },
                      "reconnectDetails": {
                        "description": "Only present when this response came from the \"get accounts by request id\" polling flow (not the direct Get Accounts call). One entry per previously-connected Instagram account that needed re-authentication during the OAuth callback: `isConnected: true` if this login restored access automatically, or `error`/`helpMessage`/`helpUrl` if the account is still not linked to a Page the user manages (or, for direct Instagram login, no longer owned by the user). Each entry also carries the account's native `originId`, which this shared reconnect schema does not list; note `error` is set as the literal boolean `true` on this platform, not a message string.",
                        "example": [
                          {
                            "_id": "65f2d989a4f2f1e5322c3856",
                            "id": "65f2d989a4f2f1e5322c3856_instagram_account_123",
                            "isConnected": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "accountId": {
                        "type": "string",
                        "description": "24-character hex identifier of the OAuth connection record this poll is for. Only present when this response came from the \"get accounts by request id\" flow; echoes the `accountId` delivered by Start OAuth. Null if that flow itself failed.",
                        "example": "instagram_account_123",
                        "nullable": true
                      },
                      "success": {
                        "type": "boolean",
                        "description": "False when the Instagram/Facebook Graph API call failed; omitted entirely on a successful call. The response envelope's top-level `success` is also set to false in that case.",
                        "example": false
                      },
                      "error": {
                        "type": "object",
                        "description": "Populated only when `success` is false — a generic, retry-safe error summary (never the raw upstream error). `code` is always `INSTAGRAM_API_ERROR`.",
                        "example": {
                          "message": "Failed to get accounts. Please try again later.",
                          "code": "INSTAGRAM_API_ERROR"
                        }
                      }
                    },
                    "title": "GetInstagramAccountsSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Threads",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Threads Account"
              },
              "results": {
                "description": "The Threads profile available to connect.",
                "example": {
                  "profile": [
                    {
                      "id": "u37swmmLbA02zgqKPpxITe2",
                      "name": "John Doe",
                      "avatar": "https://example.com/avatar.jpg",
                      "username": "johndoe",
                      "isConnected": false
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "Threads Profile Details",
                        "example": [
                          {
                            "id": "u37swmmLbA02zgqKPpxITe2",
                            "name": "John Doe",
                            "avatar": "https://example.com/avatar.jpg",
                            "username": "johndoe",
                            "isConnected": false
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "ID of profile",
                              "example": "u37swmmLbA02zgqKPpxITe2"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of profile",
                              "example": "John Doe"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "Avatar of profile",
                              "example": "https://example.com/avatar.jpg"
                            },
                            "username": {
                              "type": "string",
                              "description": "Username of profile",
                              "example": "johndoe"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "Is connected",
                              "example": false
                            }
                          },
                          "title": "ThreadsProfileSchema"
                        }
                      }
                    },
                    "title": "GetThreadsAccountsSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "YouTube",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Youtube Account"
              },
              "results": {
                "description": "The YouTube channels available to connect.",
                "example": {
                  "profile": [
                    {
                      "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
                      "name": "Account Name",
                      "username": "@username",
                      "avatar": "https://yt3.ggpht.com/sample-channel-avatar=s240-c-k-c0x00ffffff-no-rj",
                      "verified": true,
                      "isConnected": true,
                      "type": "profile"
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "YouTube channel profile details for the connected accounts",
                        "example": [
                          {
                            "id": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
                            "name": "Account Name",
                            "username": "@username",
                            "avatar": "https://yt3.ggpht.com/sample-channel-avatar=s240-c-k-c0x00ffffff-no-rj",
                            "verified": true,
                            "isConnected": true,
                            "type": "profile"
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The YouTube channel ID for the authenticated user's channel.",
                              "example": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
                            },
                            "name": {
                              "type": "string",
                              "description": "Display title of the YouTube channel.",
                              "example": "Account Name"
                            },
                            "username": {
                              "type": "string",
                              "description": "The channel's custom URL handle, or undefined when the channel has not set one.",
                              "example": "@username"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "URL of the channel's thumbnail image (medium size, falling back to default).",
                              "example": "https://yt3.ggpht.com/sample-channel-avatar=s240-c-k-c0x00ffffff-no-rj"
                            },
                            "verified": {
                              "type": "boolean",
                              "description": "True when the channel is eligible for long uploads (YouTube's status.longUploadsStatus === 'allowed'). Used as a proxy for account standing — it is not a general verification badge.",
                              "example": true
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this channel is already attached to the location as a connected account.",
                              "example": true
                            },
                            "type": {
                              "type": "string",
                              "description": "Always 'profile' — YouTube only supports connecting a channel as a personal profile account.",
                              "enum": [
                                "profile"
                              ],
                              "example": "profile"
                            }
                          },
                          "title": "YoutubeProfileSchema"
                        }
                      },
                      "reconnectDetails": {
                        "description": "Only meaningful during a reconnect (query param reconnect=true on the request-id polling call) — always empty on a plain new connect. Lists the location's previously-connected YouTube accounts under this OAuth: an entry with isConnected: true was reactivated because it belongs to the same channel owner who just re-authenticated, while an entry carrying error/helpMessage is owned by a different YouTube account and still needs its original owner to reconnect.",
                        "example": [
                          {
                            "_id": "65f2d989a4f2f1e5322c3856",
                            "id": "65f2d989a4f2f1e5322c3856_65f2d989a4f2f1e5322c3856_65f2d989a4f2f1e5322c3856",
                            "error": "Token expired",
                            "helpMessage": "Reconnect this account to continue publishing."
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "accountId": {
                        "type": "string",
                        "description": "Local OAuth record ID for the connection that was just completed or reconnected. Only populated by the request-id polling endpoint, not by the Get Accounts step.",
                        "example": "w37swmmLbA02zgqKPpxITe"
                      },
                      "_id": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Unique identifier of the connected account record, generated when the channel is first attached. Use it as accountId in later calls such as Update Account Meta.",
                        "example": "65f2d989a4f2f1e5322c3856"
                      },
                      "oAuthId": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. ID of the YouTube OAuth record (the stored token pair) this account authenticates through.",
                        "example": "65f2d989a4f2f1e5322c3850"
                      },
                      "oldId": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Composite legacy key built as {oAuthId}_{locationId}_{originId}_{type}, kept for backward compatibility with integrations that stored this format before _id was used as the account reference.",
                        "example": "65f2d989a4f2f1e5322c3850_w37swmmLbA02zgqKPpxITe2_UC_x5XG1OV2P6uZZ5FSM9Ttw_profile"
                      },
                      "locationId": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Location the account is connected to.",
                        "example": "w37swmmLbA02zgqKPpxITe2"
                      },
                      "originId": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. YouTube channel ID this account represents — the same value sent as originId in the Attach Account request.",
                        "example": "UC_x5XG1OV2P6uZZ5FSM9Ttw"
                      },
                      "platform": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Always 'youtube' for a YouTube connected account.",
                        "enum": [
                          "google",
                          "facebook",
                          "instagram",
                          "threads",
                          "bluesky",
                          "linkedin",
                          "twitter",
                          "tiktok",
                          "youtube",
                          "pinterest",
                          "community"
                        ],
                        "example": "youtube"
                      },
                      "type": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Always 'profile' — YouTube only supports connecting a channel as a personal profile account.",
                        "enum": [
                          "page",
                          "group",
                          "profile",
                          "location",
                          "business"
                        ],
                        "example": "profile"
                      },
                      "name": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Display name of the channel, copied from the Attach Account request body.",
                        "example": "Account Name"
                      },
                      "avatar": {
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Avatar image URL, copied from the Attach Account request body.",
                        "example": "https://yt3.ggpht.com/sample-channel-avatar=s240-c-k-c0x00ffffff-no-rj"
                      },
                      "meta": {
                        "type": "object",
                        "description": "Only present in the Attach Account (POST) response. YouTube-specific metadata; today this is always { verified, username } copied from the Attach Account request body.",
                        "example": {
                          "verified": true,
                          "username": "@username"
                        }
                      },
                      "active": {
                        "type": "boolean",
                        "description": "Only present in the Attach Account (POST) response. True while the account is connected and its token is valid; false once it needs to be reconnected.",
                        "example": true
                      },
                      "deleted": {
                        "type": "boolean",
                        "description": "Only present in the Attach Account (POST) response. True once the account has been soft-deleted (disconnected); deleted accounts are excluded from Get Accounts results.",
                        "example": false
                      },
                      "createdAt": {
                        "format": "date-time",
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Timestamp the account was first attached.",
                        "example": "2024-03-14T11:03:37.015Z"
                      },
                      "updatedAt": {
                        "format": "date-time",
                        "type": "string",
                        "description": "Only present in the Attach Account (POST) response. Timestamp of the most recent update to this record.",
                        "example": "2024-03-14T11:03:37.015Z"
                      }
                    },
                    "title": "GetYoutubeAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Bluesky",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Bluesky Account"
              },
              "results": {
                "description": "The Bluesky profile available to connect.",
                "example": {
                  "profile": [
                    {
                      "id": "did:plc:abc123",
                      "name": "John Doe",
                      "avatar": "https://example.com/avatar.jpg",
                      "handle": "handle.bsky.social",
                      "displayName": "John Doe",
                      "isConnected": false
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "Bluesky Profile Details",
                        "example": [
                          {
                            "id": "did:plc:abc123",
                            "name": "John Doe",
                            "avatar": "https://example.com/avatar.jpg",
                            "handle": "handle.bsky.social",
                            "displayName": "John Doe",
                            "isConnected": false
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Bluesky DID (decentralized identifier) of the profile",
                              "example": "did:plc:abc123"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of profile",
                              "example": "John Doe"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "Avatar of profile",
                              "example": "https://example.com/avatar.jpg"
                            },
                            "handle": {
                              "type": "string",
                              "description": "Bluesky handle of the profile",
                              "example": "handle.bsky.social"
                            },
                            "displayName": {
                              "type": "string",
                              "description": "Display name of the profile",
                              "example": "John Doe"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "Is connected",
                              "example": false
                            }
                          },
                          "title": "BlueskyProfileSchema"
                        }
                      }
                    },
                    "title": "GetBlueskyAccountsSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Tiktok",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 201
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Tiktok Business Account"
              },
              "results": {
                "description": "The TikTok account available to connect for this OAuth account. Used for both the tiktok and tiktok-business platforms — both route through the same TikTok Business API lookup.",
                "example": {
                  "profile": [
                    {
                      "id": "7401982639320318982",
                      "name": "Account Name",
                      "username": "user_name",
                      "avatar": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg",
                      "verified": true,
                      "isConnected": true,
                      "type": "business",
                      "isBusinessAccount": true
                    }
                  ]
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "The TikTok account available to connect. A single-element array — TikTok OAuth authenticates exactly one account per connection, whether it is a personal creator account (tiktok) or a Business Center account (tiktok-business). Empty array when the profile could not be fetched.",
                        "example": [
                          {
                            "id": "7401982639320318982",
                            "name": "Account Name",
                            "username": "user_name",
                            "avatar": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg",
                            "verified": true,
                            "isConnected": true,
                            "type": "business",
                            "isBusinessAccount": true
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "The TikTok user's open_id, scoped to this app. Send this value back as originId when calling Attach Account.",
                              "example": "7401982639320318982"
                            },
                            "name": {
                              "type": "string",
                              "description": "Display name of the TikTok account.",
                              "example": "Account Name"
                            },
                            "username": {
                              "type": "string",
                              "description": "@handle of the TikTok account.",
                              "example": "user_name"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "URL of the account's profile image, as returned by TikTok.",
                              "example": "https://p16-sign-va.tiktokcdn.com/sample-avatar.jpeg"
                            },
                            "verified": {
                              "type": "boolean",
                              "description": "True when TikTok has verified the account. For a profile (personal creator) account this reflects the caller's own longUploadsStatus; for a business account it is only filled in once the profile is matched to an already-connected account, so it can be absent on a first-time business connect.",
                              "example": true
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "True when this profile is already attached to the location as a connected account.",
                              "example": true
                            },
                            "type": {
                              "type": "string",
                              "description": "'profile' for a personal TikTok creator login (tiktok platform) or 'business' for a TikTok Business Center login (tiktok-business platform).",
                              "enum": [
                                "profile",
                                "business"
                              ],
                              "example": "business"
                            },
                            "isBusinessAccount": {
                              "type": "boolean",
                              "description": "True when this profile was fetched through the TikTok Business API (a tiktok-business connect). Not present on profiles returned for the personal tiktok platform.",
                              "example": true
                            }
                          },
                          "title": "TiktokProfileSchema"
                        }
                      }
                    },
                    "title": "GetTiktokBusinessAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          },
          {
            "title": "Pinterest",
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Success or Failure",
                "example": true
              },
              "statusCode": {
                "type": "number",
                "description": "Status Code",
                "example": 200
              },
              "message": {
                "type": "string",
                "description": "Message",
                "example": "Fetched Pinterest Account"
              },
              "results": {
                "description": "Requested Results",
                "example": {
                  "profile": [
                    {
                      "id": "pinterest_account_123",
                      "name": "Pinterest account",
                      "username": "sample_user",
                      "avatar": "https://example.com/avatar.jpg",
                      "isConnected": true,
                      "type": "PINNER"
                    }
                  ],
                  "reconnectDetails": [],
                  "accountId": "pinterest_account_123"
                },
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "profile": {
                        "description": "Pinterest Profile Details",
                        "example": [
                          {
                            "id": "pinterest_account_123",
                            "name": "Pinterest account",
                            "username": "sample_user",
                            "avatar": "https://example.com/avatar.jpg",
                            "isConnected": true,
                            "type": "PINNER"
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "description": "Id",
                              "example": "w37swmmLbA02zgqKPpxITe"
                            },
                            "name": {
                              "type": "string",
                              "description": "Name of account",
                              "example": "Account Name"
                            },
                            "username": {
                              "type": "string",
                              "description": "Username of account",
                              "example": "@username"
                            },
                            "avatar": {
                              "type": "string",
                              "description": "Avatar of profile account",
                              "example": "w37swmmLbA02zgqKPpxITe"
                            },
                            "isConnected": {
                              "type": "boolean",
                              "description": "Is connected",
                              "example": true
                            },
                            "type": {
                              "type": "string",
                              "description": "Pinterest Account Type",
                              "example": "PINNER"
                            },
                            "websiteUrl": {
                              "type": "string",
                              "description": "Pinterest Account website Url",
                              "example": "https://www.pinterest.com/"
                            }
                          },
                          "title": "PinterestProfileSchema"
                        }
                      },
                      "reconnectDetails": {
                        "description": "Reconnect Account Details",
                        "example": [
                          {
                            "_id": "65f2d989a4f2f1e5322c3856",
                            "id": "65f2d989a4f2f1e5322c3856_pinterest_account_123",
                            "error": "Token expired",
                            "helpMessage": "Reconnect this account to continue publishing."
                          }
                        ],
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "accountId": {
                        "type": "string",
                        "description": "Account ID",
                        "example": "pinterest_account_123"
                      }
                    },
                    "title": "GetPinterestAccountSchema"
                  }
                ]
              }
            },
            "required": [
              "success",
              "statusCode",
              "message"
            ]
          }
        ]
      },
      "BadRequestDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 400
          },
          "message": {
            "type": "string",
            "example": "Bad Request"
          }
        },
        "title": "BadRequestDTO"
      },
      "UnauthorizedDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 401
          },
          "message": {
            "type": "string",
            "example": "Invalid token: access token is invalid"
          },
          "error": {
            "type": "string",
            "example": "Unauthorized"
          }
        },
        "title": "UnauthorizedDTO"
      },
      "UnprocessableDTO": {
        "type": "object",
        "properties": {
          "statusCode": {
            "type": "number",
            "example": 422
          },
          "message": {
            "example": [
              "Unprocessable Entity"
            ],
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "error": {
            "type": "string",
            "example": "Unprocessable Entity"
          }
        },
        "title": "UnprocessableDTO"
      }
    }
  }
}
```

## Code Examples

**cURL**

```bash
curl -L -X GET 'https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>' \
  -H 'Authorization: Bearer <TOKEN>' \
  -H 'Version: v3'
```

**Node.js**

```javascript
const options = {
  method: 'GET',
  headers: {
    Authorization: 'Bearer <TOKEN>',
    Version: 'v3'
  }
};

try {
  const response = await fetch('https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>', options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

**Python**

```python
import requests

url = "https://services.leadconnectorhq.com/social-media-posting/oauth/{locationId}/{platform}/accounts/{accountId}"

headers = {
    "Authorization": "Bearer <TOKEN>",
    "Version": "v3"
}

response = requests.get(url, headers=headers)
print(response.json())
```

**PHP**

```php
<?php
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <TOKEN>',
    'Version: v3',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

**Java**

```java
HttpResponse<String> response = Unirest
  .get("https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>")
  .header("Authorization", "Bearer <TOKEN>")
  .header("Version", "v3")
  .asString();
```

**Go**

```go
package main

import (
  "fmt"
  "net/http"
  "io"
)

func main() {
  url := "https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>"
  req, _ := http.NewRequest("GET", url, nil)
  req.Header.Add("Authorization", "Bearer <TOKEN>")
  req.Header.Add("Version", "v3")

  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := io.ReadAll(res.Body)
  fmt.Println(string(body))
}
```

**Ruby**

```ruby
require 'uri'
require 'net/http'

url = URI("https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer <TOKEN>"
request["Version"] = "v3"

response = http.request(request)
puts response.read_body
```

**PowerShell**

```powershell
$headers = @{
  "Authorization" = "Bearer <TOKEN>"
  "Version" = "v3"
}

$response = Invoke-RestMethod -Uri 'https://services.leadconnectorhq.com/social-media-posting/oauth/<locationId>/<platform>/accounts/<accountId>' -Method 'GET' -Headers $headers
$response | ConvertTo-Json
```
