> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a Social Account

> Starts an OAuth connection flow for a social account and returns an authorize_url to redirect the user to. Today the only supported platform is meta_business, which grants the advertise scope so the connected Facebook page and Instagram account can run ads. The required permission follows the requested capability: the advertise scope requires ad_campaign:create (so advertiser roles can connect), other scopes require social_account:create. The connection is authorized against the account given by account_id (a biz_ identifier); an account-scoped API key may omit it to default to its own account.



## OpenAPI

````yaml /openapi/api-v1-native.yml post /social_accounts
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /social_accounts:
    parameters:
      - $ref: '#/components/parameters/ApiVersionDate'
    post:
      tags:
        - Social Accounts
      summary: Connect a Social Account
      description: >-
        Starts an OAuth connection flow for a social account and returns an
        authorize_url to redirect the user to. Today the only supported platform
        is meta_business, which grants the advertise scope so the connected
        Facebook page and Instagram account can run ads. The required permission
        follows the requested capability: the advertise scope requires
        ad_campaign:create (so advertiser roles can connect), other scopes
        require social_account:create. The connection is authorized against the
        account given by account_id (a biz_ identifier); an account-scoped API
        key may omit it to default to its own account.
      operationId: connectSocialAccount
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                redirect_url:
                  type: string
                  description: >-
                    The Whop URL to redirect the user to after they finish
                    connecting.
                platform:
                  type: string
                  enum:
                    - meta_business
                  description: The platform to connect the social account on.
                account_id:
                  type: string
                  description: >-
                    The Account (biz_ identifier) to connect the social account
                    for. An account-scoped API key may omit this to default to
                    its own account.
                scopes:
                  type: array
                  items:
                    type: string
                    enum:
                      - advertise
                  description: >-
                    Capabilities to grant for the connected social account, for
                    example `advertise`.
              required:
                - redirect_url
                - platform
        required: true
      responses:
        '200':
          description: authorize url returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  authorize_url:
                    type: string
                    description: The OAuth authorization URL to redirect the user to.
                required:
                  - authorize_url
        '400':
          $ref: '#/components/responses/InvalidParameters'
          description: unsupported platform
        '401':
          $ref: '#/components/responses/Unauthorized'
          description: missing or invalid authentication
      security:
        - bearerAuth:
            - social_account:create
components:
  parameters:
    ApiVersionDate:
      name: Api-Version-Date
      in: header
      required: false
      schema:
        type: string
        example: 2026-07-08-1
      description: Pins the request to a dated API version.
  responses:
    InvalidParameters:
      description: Invalid Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
  schemas:
    V1ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable error message.
          required:
            - type
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        An account API key, account scoped JWT, app API key, or user OAuth
        token.

````