> ## 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.

# Start an authorization

> Authorization endpoint (RFC 6749 section 4.1.1) for the authorization code flow with PKCE, on the auth origin. Redirects the browser to the OFAuth consent screen; after the person decides, the browser is sent to `redirect_uri` with `code` and `state`, or `error` and `state`. The client ID selects the environment.



## OpenAPI

````yaml /openapi/v3.json get /v3/authorize
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth V3 API for linking accounts, making OnlyFans API requests, and
    receiving events.
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ExternalOAuth: []
tags:
  - name: Link
    description: Link accounts, get and refresh tokens, and end access.
  - name: Linked accounts
    description: The linked accounts of one authorization, and their settings.
  - name: Access
    description: Make OnlyFans API requests for a linked account.
  - name: Analytics
    description: 'Access: charts, rankings, and performance data.'
  - 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: linked account profile and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: Webhook event formats, including OnlyFans activity events.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v3/authorize:
    servers:
      - url: https://link.ofauth.com
    get:
      tags:
        - Link
      summary: Start an authorization
      description: >-
        Authorization endpoint (RFC 6749 section 4.1.1) for the authorization
        code flow with PKCE, on the auth origin. Redirects the browser to the
        OFAuth consent screen; after the person decides, the browser is sent to
        `redirect_uri` with `code` and `state`, or `error` and `state`. The
        client ID selects the environment.
      operationId: linkAuthorize
      parameters:
        - schema:
            type: string
            enum:
              - code
          required: true
          name: response_type
          in: query
        - schema:
            type: string
            example: ofext_live_0123456789abcdef0123456789abcdef
          required: true
          name: client_id
          in: query
        - schema:
            type: string
            format: uri
            description: Must exactly match the registered redirect URI.
          required: true
          name: redirect_uri
          in: query
        - schema:
            type: string
            description: >-
              Space separated scopes. Supported: analytics:read, finances:read,
              lists:read, lists:write, messages:read, messages:write,
              notifications:read, notifications:write, posts:read, posts:write,
              profile:read, profile:write, promotions:read, promotions:write,
              queue:read, queue:write, stories:read, stories:write,
              subscribers:read, subscribers:write, subscriptions:read,
              subscriptions:write, users:read, users:write, vault:read,
              vault:write, identity:read, offline_access.
            example: profile:read offline_access
          required: true
          name: scope
          in: query
        - schema:
            type: string
            description: Opaque value returned on the redirect.
          required: true
          name: state
          in: query
        - schema:
            type: string
            description: PKCE challenge (RFC 7636).
          required: true
          name: code_challenge
          in: query
        - schema:
            type: string
            enum:
              - S256
          required: true
          name: code_challenge_method
          in: query
        - schema:
            type: string
            description: >-
              Live only. Comma-separated linked account ids (at most 25) that
              belong to the same person: after they reconnect, these accounts
              are grouped under the person who reconnects.
          required: false
          name: linked_account_ids
          in: query
        - schema:
            type: string
            description: >-
              Not needed. Accepted only for OAuth client libraries that always
              send a resource indicator (RFC 8707): it must equal
              `https://api.ofauth.com/v3` and is not stored.
            format: uri
          required: false
          name: resource
          in: query
      responses:
        '302':
          description: Redirect to the OFAuth consent screen.
          headers:
            Location:
              schema:
                type: string
                example: https://link.ofauth.com/oauth/consent?...
              required: true
            Cache-Control:
              schema:
                type: string
                example: no-store
              required: true
        '400':
          description: Malformed request, unsupported scope, or unknown client.
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
              required: true
            Pragma:
              schema:
                type: string
                example: no-cache
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkAuthorizationError'
        '403':
          description: >-
            The client cannot be authorized (for example `access_denied` with a
            lifecycle `reason`).
          headers:
            Cache-Control:
              schema:
                type: string
                example: no-store
              required: true
            Pragma:
              schema:
                type: string
                example: no-cache
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkAuthorizationError'
      security: []
      servers:
        - url: https://link.ofauth.com
components:
  schemas:
    LinkAuthorizationError:
      type: object
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - invalid_scope
            - unauthorized_client
            - access_denied
          description: >-
            OAuth error code (RFC 6749 section 4.1.2.1). Returned directly if
            OFAuth cannot use a registered redirect URI for this request.
        reason:
          type: string
          example: integration_not_approved
      required:
        - error
  securitySchemes:
    ExternalOAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: Link access token for one Sandbox, Test, or Live authorization.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.