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

# Any OnlyFans API Request

> Make any OnlyFans API request through the Access proxy. OFAuth handles request signing, proxy routing, and session management. The request and response format depends on the underlying OnlyFans API endpoint.

**Base URL:** `https://api.ofauth.com/v2/access/proxy`

<Panel>
  <CodeGroup>
    ```http GET theme={null}
    GET /v2/access/proxy/{path}
    ```

    ```http POST   theme={null}
    POST /v2/access/proxy/{path}
    ```

    ```http PUT theme={null}
    PUT /v2/access/proxy/{path}
    ```

    ```http PATCH theme={null}
    PATCH /v2/access/proxy/{path}
    ```

    ```http DELETE theme={null}
    DELETE /v2/access/proxy/{path}
    ```
  </CodeGroup>

  <RequestExample>
    ```bash cURL theme={null}
    curl -X GET 'https://api.ofauth.com/v2/access/proxy/users/me' \
      -H 'apikey: YOUR_API_KEY' \
      -H 'x-connection-id: conn_abc123'
    ```

    ```javascript JavaScript theme={null}
    const response = await fetch('https://api.ofauth.com/v2/access/proxy/users/me', {
      headers: {
        'apikey': 'YOUR_API_KEY',
        'x-connection-id': 'conn_abc123'
      }
    });

    const userData = await response.json();
    ```

    ```python Python theme={null}
    import requests

    response = requests.get(
        'https://api.ofauth.com/v2/access/proxy/users/me',
        headers={
            'apikey': 'YOUR_API_KEY',
            'x-connection-id': 'conn_abc123'
        }
    )

    user_data = response.json()
    ```

    ```bash Connection ID POST theme={null}
    curl -X POST 'https://api.ofauth.com/v2/access/proxy/chats/123/messages' \
      -H 'apikey: YOUR_API_KEY' \
      -H 'x-connection-id: conn_abc123' \
      -H 'Content-Type: application/json' \
      -d '{"text": "Hello there!"}'
    ```

    ```javascript JavaScript POST theme={null}
    const response = await fetch('https://api.ofauth.com/v2/access/proxy/chats/123/messages', {
      method: 'POST',
      headers: {
        'apikey': 'YOUR_API_KEY',
        'x-connection-id': 'conn_abc123',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        text: 'Hello there!'
      })
    });
    ```
  </RequestExample>

  <ResponseExample>
    ```json Success (Example: users/me) theme={null}
    {
      "id": 12345,
      "username": "example_user",
      "name": "Example User",
      "email": "user@example.com",
      "avatar": "https://cdn.onlyfans.com/...",
      "cover": "https://cdn.onlyfans.com/...",
      "subscribersCount": 150,
      "favoritesCount": 25
    }
    ```

    ```json Session Expired (Connection ID) theme={null}
    {
      "error": "Connection expired",
      "type": "SESSION_EXPIRED", 
      "actionRequired": "relink_connection",
      "requestId": "req_abc123"
    }
    ```

    ```json Invalid Connection theme={null}
    {
      "error": "Connection not found",
      "type": "SESSION_NOT_PROVIDED",
      "requestId": "req_abc123"
    }
    ```

    ```json Missing Authentication theme={null}
    {
      "error": "No authentication provided",
      "code": "NO_AUTH"
    }
    ```

    ```json Rate Limited theme={null}
    {
      "error": "Rate limit exceeded for connection",
      "code": "RATE_LIMITED",
      "connection_id": "conn_abc123",
      "retryAfter": 5
    }
    ```

    ```json Rules Outdated theme={null}
    {
      "error": "No rules found, likely a problem with the dynamic rules. Try again later.",
      "type": "RULES_OUTDATED",
      "action_required": "refresh_rules"
    }
    ```

    ```json Proxy Error theme={null}
    {
      "error": "No proxies available. Proxies are being refreshed, please try again in a few seconds.",
      "type": "PROXY_ERROR",
      "action_required": "try_again"
    }
    ```

    ```json Invalid Path theme={null}
    {
      "error": "Invalid path. Must start with /api2/v2/",
      "code": "INVALID_PATH"
    }
    ```
  </ResponseExample>

  <ParamField path="path" type="string" required>
    The OnlyFans API path to proxy to. This can be any valid OnlyFans API endpoint path.

    **Examples:**

    * `users/me` - Get current user information
    * `chats` - Get chat conversations
    * `users/12345/posts` - Get posts for user 12345
    * `subscriptions/subscribers` - Get subscribers
  </ParamField>
</Panel>

## Authentication

| Header   | Required | Notes                             |
| -------- | -------- | --------------------------------- |
| `apikey` | Yes      | API key from the OFAuth dashboard |

<CodeGroup>
  ```http Headers theme={null}
  apikey: YOUR_API_KEY
  ```

  ```bash cURL theme={null}
  curl -H 'apikey: YOUR_API_KEY' \
       'https://api.ofauth.com/v2/access/proxy/users/me'
  ```
</CodeGroup>

All Access API requests require a [connection](/guides/connections). Pass the connection ID in the `x-connection-id` header alongside your API key.

<ParamField header="apikey" type="string" required>
  Your OFAuth API key
</ParamField>

<ParamField header="x-connection-id" type="string" required>
  The connection ID from [Link authentication](/guides/link) or [import](/guides/connections#importing-connections)
</ParamField>

## Status Codes

| Code  | Description                                       |
| ----- | ------------------------------------------------- |
| `200` | Request successful - response from OnlyFans API   |
| `400` | Bad request - invalid parameters or path          |
| `401` | Unauthorized - invalid API key or expired session |
| `429` | Rate limit exceeded                               |
| `500` | Internal server error                             |
| `502` | Bad gateway - proxy or OnlyFans API error         |

<Note>
  The specific response structure and status codes depend on the OnlyFans API endpoint being accessed. OFAuth passes through responses transparently while handling authentication and proxy management.
</Note>

## Rate Limits

Rate limits are applied per connection ID or session:

* **Standard**: 60 requests/minute (burst: 90)
* **Scale**: No OFAuth limits

<Warning>
  OFAuth rate limits are separate from OnlyFans' native rate limits. You may still encounter OnlyFans rate limiting even when within OFAuth limits.
</Warning>

## Related Endpoints

<CardGroup cols={2}>
  <Card title="Link API" href="/api-reference/link/overview">
    Authenticate users and get connection IDs
  </Card>

  <Card title="Access Guide" href="/api-reference/access/overview">
    Detailed guide with examples and best practices
  </Card>
</CardGroup>
