Skip to main content

Overview

OFAuth provides multiple environments so you can build safely and ship with confidence. All environments work the exact same in terms of APIs, behavior, and supported features. The only difference is the data source:
  • Live: Your production data and traffic
  • Sandbox: Safe, deterministic demo data that closely mirrors real responses
The environment is encoded in your API key. No extra headers are needed in most cases. Keys look like sk_live_... or sk_sandbox_.... You can create both Live and Sandbox keys from the dashboard.

Live

  • Real OnlyFans requests and responses
  • Production-grade rate limits and reliability policies
  • Full webhook delivery and auditing
  • Recommended for real users and production workloads

Sandbox

  • Endpoints return deterministic, realistic fixtures (no real OnlyFans calls)
  • Great for demos, testing, CI, and UI development
  • Identical endpoints, behavior, and response shapes to Live
  • Switch by changing only the API key—no code changes
Use a Sandbox API key during development and switch to a Live key for production. No code changes needed.

Selecting an Environment

  • By API key: The simplest and recommended approach. The key prefix determines the environment automatically.
    • sk_live_... → Live
    • sk_sandbox_... → Sandbox
  • Explicit override (advanced): Some endpoints accept an environmentType option when initializing sessions (e.g., Link). If provided, it must match your key’s environment.

Feature Parity

All endpoints, behavior, and schemas are identical across environments. Sandbox uses realistic fixture payloads instead of live network calls.
  • Link flows accept special sandbox login credentials for quick testing
  • Access returns realistic fixture payloads
  • Webhooks are simulated and mirror Live payloads for end-to-end testing