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

# Import connection

> Import an externally managed connection. Imported connections are not billed monthly and are not health-checked by the connection monitor. They can be used through the Access API immediately. The session is validated by making a request to OnlyFans, and user profile data is fetched automatically.



## OpenAPI

````yaml https://api.ofauth.com/openapi.json post /v2/account/connections/import
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth API including Account, Connections, Link, Access, Dynamic Rules,
    Vault+, and Realtime webhook contracts
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ApiKey: []
tags:
  - name: Account
    description: Account management endpoints.
  - name: Connections
    description: Connection management endpoints.
  - name: Link
    description: Link authentication and session endpoints.
  - name: Access
    description: All Access related endpoints.
  - name: Analytics
    description: 'Access: charts, tops, and performance metrics.'
  - name: Earnings
    description: 'Access: earnings charts, transactions, and chargebacks.'
  - name: Messages
    description: 'Access: messaging, chats, queue, and mass messaging.'
  - name: Posts
    description: 'Access: create, edit, list, and manage posts.'
  - name: Promotions
    description: 'Access: promotions, trials, and bundles.'
  - name: Users
    description: 'Access: user profiles, subscriptions, and actions.'
  - name: Vault
    description: 'Access: vault folders, media, and management.'
  - name: Upload
    description: 'Access: media upload and processing.'
  - name: Self
    description: 'Access: authenticated account details and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: >-
      Realtime webhook delivery contracts, including relayed OnlyFans websocket
      events.
  - name: Dynamic Rules
    description: Dynamic signing rules operations.
  - name: Vault+
    description: Vault+ caching and management.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v2/account/connections/import:
    post:
      tags:
        - Account
      summary: Import connection
      description: >-
        Import an externally managed connection. Imported connections are not
        billed monthly and are not health-checked by the connection monitor.
        They can be used through the Access API immediately. The session is
        validated by making a request to OnlyFans, and user profile data is
        fetched automatically.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cookie:
                  type: string
                  description: >-
                    The OnlyFans session cookie string. Must contain `auth_id`,
                    `sess`, and `fp` values.
                userAgent:
                  type: string
                  description: The user agent string that was used to create this session.
                permissions:
                  type: array
                  items:
                    type: string
                  description: Permissions to grant. Defaults to organization permissions.
                clientReferenceId:
                  type: string
                  nullable: true
                  description: Optional client reference ID for tracking.
              required:
                - cookie
                - userAgent
      responses:
        '200':
          description: Connection imported successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - active
                      - expired
                      - awaiting_2fa
                    description: The status of the connection.
                  id:
                    type: string
                    description: The ID of the connection.
                  userData:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The ID of the user.
                      name:
                        type: string
                        description: The name of the user.
                      username:
                        type: string
                        description: The username of the user.
                      avatar:
                        type: string
                        nullable: true
                        description: The avatar of the user.
                    required:
                      - id
                      - name
                      - username
                      - avatar
                    description: >-
                      Data could be outdated if the connection is expired, but
                      will be updated once the account has been reconnected.
                  permissions:
                    type: array
                    items:
                      type: string
                    description: The permissions of the connection.
                  expiredAt:
                    type: string
                    nullable: true
                    description: The expiration date of the connection.
                  createdAt:
                    type: string
                    description: The creation date of the connection.
                  updatedAt:
                    type: string
                    description: The last update date of the connection.
                  clientReferenceId:
                    type: string
                    nullable: true
                    description: The client reference ID of the connection.
                  imported:
                    type: boolean
                    description: Whether this is an imported (non-managed) connection.
                  lastCheckedAt:
                    type: string
                    nullable: true
                    description: The last time the connection was checked or used.
                  liveEvents:
                    type: object
                    properties:
                      enabled:
                        type: boolean
                        description: >-
                          Whether raw OnlyFans websocket event forwarding is
                          enabled for this connection.
                    required:
                      - enabled
                    description: Raw OnlyFans websocket event forwarding settings.
                required:
                  - status
                  - id
                  - userData
                  - permissions
                  - expiredAt
                  - createdAt
                  - updatedAt
                  - clientReferenceId
                  - imported
                  - lastCheckedAt
                  - liveEvents
        '400':
          description: Invalid session - cookie must contain auth_id, sess, and fp values
        '401':
          description: Unauthorized
        '409':
          description: Connection with this OnlyFans user already exists
        '422':
          description: >-
            Session validation failed - the provided session is invalid or
            expired
        '500':
          description: Internal server error
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: apiKey
      in: header
      description: >-
        Your OFAuth [API key](/quickstart#2-copy-your-api-key) for
        authenticating requests.

````