/** * @example * { * platform: "meta_business", * redirect_url: "https://whop.com/dashboard/biz_xxxxxxxxxxxxxx/ads/settings" * } */ export interface ConnectExternalAccountsRequest { /** 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. */ account_id?: string; /** 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. Use `quickbooks` to connect the account’s QuickBooks Online company: pass `account_id`, omit `scopes`, and the user picks the company in QuickBooks. */ platform: ConnectExternalAccountsRequest.Platform; /** Where to send the user once they finish connecting their accounts. Must be an `https` URL on whop.com; any other host is rejected. 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`. */ redirect_url: string; /** 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. For `quickbooks`, omit scopes; the connection belongs to the account in `account_id`. Profile connections still request the platform permissions needed to read the profile. */ scopes?: ConnectExternalAccountsRequest.Scopes.Item[]; } export declare namespace ConnectExternalAccountsRequest { /** 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. Use `quickbooks` to connect the account’s QuickBooks Online company: pass `account_id`, omit `scopes`, and the user picks the company in QuickBooks. */ const Platform: { readonly MetaBusiness: "meta_business"; readonly Tiktok: "tiktok"; readonly Linkedin: "linkedin"; readonly Youtube: "youtube"; readonly X: "x"; readonly Snapchat: "snapchat"; readonly Quickbooks: "quickbooks"; }; type Platform = (typeof Platform)[keyof typeof Platform]; type Scopes = Scopes.Item[]; namespace Scopes { const Item: { readonly Advertise: "advertise"; }; type Item = (typeof Item)[keyof typeof Item]; } }