# Running OnlyFans and Fansly Accounts from One Stack

> Manage OnlyFans and Fansly accounts from one stack using our unified API layer. Scale your agency operations with dedicated mobile proxies and event webhooks.

**TL;DR**

- A single API key covers both OnlyFans and Fansly, each with its own endpoint family and webhooks (Basic and up), without requiring separate billing plans or duplicate proxy setups.
- Every connected OnlyFans account gets one dedicated mobile IP (US or UK) on Basic plans and up to keep every account protected; Fansly accounts connect through a managed US or UK proxy or your own.
- On Basic and up, Fansly webhooks arrive in near real-time via our websocket relay and use a `fansly.` prefix to prevent event collision with OnlyFans payloads.
- With `@onlyfansapi/auth`, the OnlyFans creator logs in with email, password and 2FA inside our secure modal, directly inside your app.

Running both OnlyFans and Fansly accounts from a single backend stack requires unifying authentication, proxy routing, and event webhooks under one orchestrating API layer. Agencies consolidate their infrastructure to eliminate fragmented dashboards by using distinct endpoint families mapped to a single master API key.

**Key Takeaways**

- A single API key covers both OnlyFans and Fansly, each with its own endpoint family and webhooks (Basic and up), without requiring separate billing plans or duplicate proxy setups.
- Every connected OnlyFans account gets one dedicated mobile IP (US or UK) on Basic plans and up to keep every account protected; Fansly accounts connect through a managed US or UK proxy or your own.
- On Basic and up, Fansly webhooks arrive in near real-time via our websocket relay and use a `fansly.` prefix to prevent event collision with OnlyFans payloads.
- With `@onlyfansapi/auth`, the OnlyFans creator logs in with email, password and 2FA inside our secure modal, directly inside your app.

## Infrastructure for managing multiple OnlyFans accounts and keeping every account protected

To build infrastructure for managing multiple OnlyFans accounts, agencies route every account through a 1:1 dedicated mobile carrier IP, have creators log in inside our secure modal, and replace background polling with event-driven webhooks, with proxies and webhooks on Basic and up.

For agencies operating exclusively on one platform, review our architecture guide to [manage multiple OnlyFans accounts](https://fansapi.com/blog/manage-multiple-onlyfans-accounts). OnlyFans does not offer a public official API. [OnlyFansAPI](https://fansapi.com/) is the leading third-party developer platform trusted by 20,000+ accounts. Our infrastructure operates with 0 accounts banned in 5+ years, providing agencies with 99.98% uptime.

## The Architecture of a Dual-Platform Stack

Consolidating multiple subscription platforms into a custom CRM or automated workflow requires separating platform logic while centralizing the network and authentication layers.

### One Master API Key for Endpoint Families

Agencies authenticate all requests across both OnlyFans and Fansly with a single Bearer Token. Accounts from either platform count identically toward subscription limits. Under [OnlyFansAPI pricing](https://fansapi.com/pricing), the Basic plan is $69/mo for 1 account, while the Pro plan is $299/mo for 5 accounts. Additional accounts on Pro cost $29, scaling down to $11.60 at higher volumes.

Both platforms run on the same plan and price, but because the underlying data schemas differ, the API routes traffic through distinct endpoint families. OnlyFans account IDs start with `acct_`; Fansly account IDs start with `fansly_acct_`.

| Feature Area | OnlyFans Endpoint Family | Fansly Endpoint Family |
| --- | --- | --- |
| Chat Messages | `GET /api/{account}/chats` | `GET /api/fansly/{fanslyAccount}/chats` |
| Sending Media | `POST /api/{account}/chats/{chat_id}/messages` | `POST /api/fansly/{fanslyAccount}/chats/{chat_id}/messages` |
| Audience Lists | `GET /api/{account}/fans/active` | `GET /api/fansly/{fanslyAccount}/subscribers` |

### Session Handling and Embedded Authentication

Creators [connect their OnlyFans accounts directly inside your app](https://fansapi.com/auth): using the `@onlyfansapi/auth` library, the creator logs in with email, password and 2FA inside our secure modal. Fansly accounts connect through `POST /api/fansly/authenticate` with the creator's username or email and password, then a 2FA code if Fansly asks for one. Everything is protected with AES-256 encryption, isolated systems and secret vaulting.

## Dedicated Mobile Proxies per Connected Account

Network routing isolates each creator profile to keep every account protected. The platform provisions one [dedicated mobile IP](https://fansapi.com/onlyfans-proxy) per connected OnlyFans account (US or UK) on Basic plans and up, and Fansly accounts connect through a managed US or UK proxy.

This infrastructure involves no rotation. The 1:1 account-to-IP ratio means there is no sharing, ever. If an agency prefers to maintain their own proxy pools, the BYOP (Bring Your Own Proxy) feature accepts your own HTTP/HTTPS proxy per account (a dedicated mobile or residential IP; datacenter IPs are not supported).

## How Do Webhooks Work Across Both Platforms?

On Basic and up, event-driven webhooks push data to your servers in near real-time, so you do not need to poll for those events.

### Webhook Delivery and Prefixes

OnlyFans webhook events are plural and include `messages.received`, `messages.ppv.unlocked`, `subscriptions.new`, `subscriptions.renewed`, and `transactions.new`.

For dual-platform stacks, Fansly accounts emit their own set of events. Delivery is driven by our Fansly websocket relay rather than polling, so events arrive in near real-time. To prevent data collisions, all Fansly events are prefixed with `fansly.`. When a Fansly message arrives, your endpoint receives `fansly.messages.received`.

### Handling Online Presence

OnlyFans emits explicit `users.online` and `users.offline` events. Fansly exposes no fan presence signal at all. To bridge this gap, agencies poll the Fansly Get User Details endpoint at `/api/fansly/{fanslyAccount}/users/{usernames}` and check the `lastSeenAt` epoch millisecond field. Bulk requests to this endpoint only cost one API credit.

## Dynamic Media Caching for Chat Assets

Cross-platform media requests process through an edge CDN caching layer to accelerate vault and chat payloads. [Fansly API endpoints](https://docs.fansapi.com/introduction/essentials/endpoint-data-sources#media-urls--file-downloads) that return media URLs rewrite any URL we have cached to a signed `https://cdn.fansapi.com/*` URL, valid for 15 minutes. Files we have not cached yet come back as the original `cdn*.fansly.com` URL; a file enters our CDN once you fetch it through Download Media from the Fansly CDN.