OpenAPI 3.1.02026-08-163864115.7 MB

c363cb2feb95

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. Supported options are meta_business and tiktok.

redirect_urlstring

The Whop URL to redirect the user to after they finish connecting.

scopesstring[]

Capabilities to grant for the connected social account. Use advertise when connecting a Meta Business or TikTok account for ads.

Example request

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "platform": "meta_business",
  "redirect_url": "https://whop.com/core/api/callback/meta/",
  "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"
}