BetterFans Link: the OnlyFans APIBetterFans Link

Test mode

Build and test against sandbox creators with a test key. Test reads and writes never reach OnlyFans.

Test mode gives you realistic creator data to build against before you link a real account, and a safe place to try writes. It is a separate copy of everything: keys, webhook endpoints, actions and logs each belong to one mode.

Turn it on

WhereHow
DashboardTurn on Test mode with the switch in the header. Pages then show test data, and keys and webhook endpoints you create are test ones.
REST APIUse a key that starts with bfl_test_.
MCP with OAuthChoose test mode on the sign-in page.
MCP with a keyUse a bfl_test_ key.

GET /v1/me returns key.mode, so your code can check which mode it is in.

The sandbox creators

Every workspace sees the same sandbox creators in test mode. You do not link them and they need no hosted link. List them with your test key:

curl https://app.betterfans.link/v1/accounts \
  -H "Authorization: Bearer $BFL_TEST_KEY"

Every account route except Call OnlyFans works against them and returns the same shapes as in live mode, so the code you build here is the code you run live. Responses in test mode have meta.source set to sandbox.

A sandbox account id works only with a test key. The same id with a live key returns 404 account_not_found, and a live account id with a test key does too.

Writes in test mode

Actions work the same way as in live mode: you create one, a person approves or rejects it in the dashboard, and it ends as executed, rejected, expired or failed. The difference is at the end. An approved test action never calls OnlyFans. Its result is only {"simulated": true}.

Use this to test the whole approval loop, including your handling of action.executed and action.rejected webhooks, before any real fan can get a message.

Webhooks in test mode

A webhook endpoint belongs to the mode it was created in. An endpoint created in test mode receives only test mode events, and every event has mode set to test. Test mode sends:

  • action.pending, action.executed, action.rejected and action.failed, for actions made with a test key.
  • account.connected and link.failed, for hosted links made with a test key.

It never sends account.status_changed, account.removed, message.received, transaction.created or subscriber.new. Those come only from linked accounts in live mode. To try their payloads, send a sample event from the dashboard: it can send any type to any endpoint. See test mode events.

What test mode does not do

  • Reads and writes never reach OnlyFans, so they cannot tell you whether a real account's session works.
  • A hosted link made with a test key is still real. The creator signs in to OnlyFans and the account is linked to your workspace; read it with a live key. Only its account.connected or link.failed event is a test mode event.
  • Call OnlyFans needs a live key. With a test key it returns 404 resource_not_found.
  • If the sandbox is briefly unavailable, test requests fail with 503 internal_error. Live keys are not affected.
  • The sandbox creators are shared by every workspace.
  • Rate limits are the same as in live mode.

When your code works against the sandbox, follow going live.

On this page