API docs / Get API access

Getting Started

Get API access

Get an OnlyFans API key from your OFManager account. Link your creators, create a scoped SDK key on the API Keys page, then install the TypeScript SDK.

Everything happens in your OFManager account at platform.ofmanager.com. There is no separate developer signup and no approval step.

1. Create an OFManager account

Sign up if you don't have an account yet. Keys belong to your OFManager organization. In an agency, only owners and admins can create them, because a key can act on behalf of your creators. A solo creator gets the same page in the creator dashboard, and their keys act on their own OnlyFans account.

A key can only reach OnlyFans accounts linked to your OFManager account. If you haven't linked any yet, follow how to add a creator. Creators with more than one page can connect every linked account too.

3. Create an SDK key

Open API Keys in the sidebar and click Create SDK key. In an agency, choose a scope:

  • Organization-wide: the key can act as any creator your agency owns.
  • Specific creators: the key is restricted to the accounts you pick.

A solo creator's key always acts on their own linked account.

You can add a label (for example "Production chatbot") and an expiry date. Leave the expiry blank for a key that doesn't expire.

The full secret is shown once, when the key is created. Copy it then. If you lose it, rotate the key to get a new secret. Revoking a key stops it working immediately. The SDK keys table shows each key's status, total requests and when it was last used.

Keep your key secret

Never commit your API key to version control. Keep it in an environment variable or your platform's secrets manager, and rotate it if it's ever exposed.

4. Find your creators' OnlyFans user IDs

Every request is made as one creator, identified by their OnlyFans user ID. The Linked OnlyFans accounts table on the API Keys page lists each creator's user ID with a copy button. Everyone in your agency can see this table, even without permission to manage keys.

5. Download and install the SDK

In the Use your key section of the API Keys page, click Download the SDK. It's always the latest build. Install the file into your project:

npm install ./betterfans-link-sdk-latest.tgz

The package is named @betterfans/link-sdk, so that's what you import. Put your key in an environment variable and make a first request:

first-request.ts
import { OfApiClient } from "@betterfans/link-sdk"

const client = new OfApiClient({
  apiKey: process.env.OFM_API_KEY,
})

const account = client.for("123456789") // a creator's OnlyFans user ID
const [error, me] = await account.request("GET /users/me", {})

if (!error) console.log(me.name, me.username)

Requirements

  • Runtime: Node.js, Bun, Deno or Cloudflare Workers
  • TypeScript: 5.0 or later recommended, so route strings are type-checked
  • Module system: ESM only
  • Dependencies: none at runtime

Next steps

  • Quickstart: list chats, send a message and listen to live events.
  • API reference: every route for chats, messages, fans, vault and earnings.
  • Revenue: pull transactions, or have the API Keys page push them to your webhook.

For custom or enterprise needs, message us on Telegram.