Social Accounts

Connect a Social Account

Starts an OAuth connection flow and returns an authorize_url where the user can connect a social account.

post/social_accounts/connect

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

A unique key that makes this request safe to retry. See Idempotent requests.

Request body

account_idstring

The Account (biz_ identifier) to connect the social account for. An account-scoped API key may omit this to default to its own account.

platform'meta_business' | 'tiktok' required

The platform to connect the social account on. Use meta_business to connect Meta Business assets, which is how Facebook Pages and Instagram accounts are connected — there is no separate instagram value. Use tiktok for TikTok accounts.

redirect_urlstring required

Where to send the user once they finish connecting their accounts. Any http or https URL. If the connection fails, the user is redirected with a social_account_error query param.

scopesstring[]

Capabilities to grant for the connected social account. advertise is required for both meta_business and tiktok connections — it is not conditional on whether you intend to run ads, and omitting it fails the request.

Example request

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "platform": "meta_business",
  "redirect_url": "https://example.com/settings/social-accounts",
  "scopes": [
    "advertise"
  ]
}

Response

authorize url returned

authorize_urlstring required

The OAuth authorization URL to redirect the user to.

Example response

{
  "authorize_url": "https://www.facebook.com/v25.0/dialog/oauth"
}

Changes

Changed in 4 of the 45 revisions of this API.15

    • the request property became required

      request-property-became-required

    • added the non-success response with the status

      response-non-success-status-added

    • added the optional property / to the response with the status

      response-optional-property-added

    • added the optional property / to the response with the status

      response-optional-property-added

    This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional header request parameter Idempotency-Key

      new-optional-request-parameter

    • added the new tiktok enum value to the request property

      request-property-enum-value-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 45 revisions, 1 has no diff computed.