Skip to main content
To test an OnlyFans integration without a real account, use OFAuth’s Sandbox environment. Sandbox runs the full OAuth flow and every Access call against mock linked accounts with consistent sample data, and keeps supported writes for 24 hours so later reads show them. It never contacts OnlyFans. When your code works there, switch to Test to validate against real OnlyFans accounts you control, then request Live approval. OFAuth gives every External Integration three isolated environments: Sandbox, Test, and Live. Each has its own client ID and secret, redirect URIs, linked accounts, tokens, webhook destinations, and data. The client ID selects the environment, so switching is a configuration change, not a code change.

Frequently Asked Questions

Does OFAuth Sandbox call OnlyFans? No. Sandbox returns mock data and makes no OnlyFans calls, so there is no risk of triggering OnlyFans security checks. Can I use a local redirect URI in Sandbox? Yes. Sandbox and Test accept HTTPS URLs and the loopback addresses http://127.0.0.1:<port>/... and http://[::1]:<port>/.... http://localhost is rejected everywhere. What happens when the Test quota runs out? Access calls return 429 quota_exhausted with recovery.action retry_after_reset. The Retry-After header gives the seconds until the daily UTC reset. What do I need for Live? An active Developer plan, Live approval of your External Integration, HTTPS redirect URIs with domain hostnames, and an approved integration purpose. Do linked account ids carry over between environments? No. The same OnlyFans account has different ids in Sandbox, Test, and Live, and a token from one environment cannot reach another.

How do I start in Sandbox?

  1. Create an External Integration in the dashboard.
  2. Copy the Sandbox client ID (ofext_sandbox_...) and secret.
  3. Register a redirect URI, for example http://127.0.0.1:3000/oauth/ofauth/callback.
  4. Follow the Quickstart for a first profile request, then use the normal authorization flow to test customer consent.
Members of the integration’s organization who can manage its credentials can authorize, for that organization’s Sandbox accounts. Authorization works end to end and returns mock linked accounts, so you exercise the same code path as production: authorize, callback, token exchange, refresh, and Access calls.
config.ts
Use a separate token-storage key for each client and user, for example JSON.stringify([clientId, appUserId]). Use that key for authorization, callbacks, and API calls. Each key holds one authorization. A Sandbox token cannot reach a Live account. See Store customer tokens.

Can I use Sandbox in CI?

Yes. Sandbox is meant for development, CI, and demos. Sample data is stable for each account, so assertions on Access responses stay stable between runs. Writes such as sending a chat message or renaming a Vault list are kept for 24 hours and show up in later reads; see Environments for the list and limits. Use a fresh Sandbox account when a test needs untouched sample data. Sandbox accounts always have Vault+ on, which lets you test Vault+ routes without enabling anything. Their settings are fixed: PATCH /v3/linked-accounts/{id}/settings returns 409 linked_account_settings_fixed. You can also point a Sandbox webhook destination at your staging server and send test deliveries from the dashboard. Test deliveries carry "test": true. What Sandbox cannot do is reproduce real account states. Mock data does not prove that you handle a real expired OnlyFans session. Use Test for that.

How do I validate against real accounts in Test?

Test uses real OnlyFans accounts, but only accounts the integration owner designated as test accounts in the dashboard. Members of your organization authorize with those accounts through the Test client (ofext_test_...). Test adds a daily operation quota on top of the standard rate limits. Handle it like any other recoverable error:
Avoid repeated logins to real accounts. Too many login attempts can trigger OnlyFans “suspicious activity” detection. Link each test account once and rely on refresh tokens.
Persist Test tokens privately. Refresh tokens stay stable and expire after 90 days without successful authenticated refresh. Retry a lost refresh response without forcing new consent.

How do I move to Live?

Live is for your customers. It requires:
  1. An active Developer plan on your organization.
  2. Live approval of your External Integration, requested from the dashboard once your integration works in Test. The review covers your purpose statement, scopes, redirect URIs, and privacy policy.
  3. HTTPS redirect URIs with domain hostnames.
  4. An approved description of how your integration uses account data.
Before approval, Live calls fail with integration_not_approved. Without the plan, they fail with subscription_required.

Learn More