Social Accounts

Connect a Social Account

Changed on

Deprecated compatibility endpoint. Connect external accounts with POST /external_accounts/connect instead.

post/social_accounts/connect

Request

  • Base URL: https://api.whop.com/api/v1
  • URL: https://api.whop.com/api/v1/social_accounts/connect
  • Auth: HTTP bearer

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 external account for. An account-scoped API key may omit this to default to its own account. Omit for user profile connections.

platform'meta_business' | 'tiktok' | 'linkedin' | 'youtube' | 'x' | 'snapchat' required

The platform to connect the external 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, snapchat for Snapchat Public Profiles, linkedin to connect the authenticated user’s LinkedIn profile, youtube to connect their YouTube channel, or x to connect their X profile.

redirect_urlstring required

Where to send the user once they finish connecting their accounts. Any http or https URL. On success, the user is redirected with an external_account_connected query param naming the platform; if the connection fails, with an external_account_error query param instead. The same values also arrive as social_account_connected / social_account_error.

scopesstring[]

The connection purpose. For meta_business and snapchat, advertise is required and connects company advertising assets. For linkedin, youtube, and x, omit scopes to connect the authenticated user’s profile; advertising is not supported. For tiktok, omit scopes to connect the authenticated user’s profile, or pass advertise to connect company advertising assets. Profile connections still request the platform permissions needed to read the profile.

Example request

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

Response

authorize url returned through the deprecated path

authorize_urlstring required

Example response

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

Changes