Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.onlyfanskit.dev/llms.txt

Use this file to discover all available pages before exploring further.

Everything in onlyfanskit revolves around one idea: connect an account once, then act on it. These are the nouns you’ll use across every surface.

Connect

A connect attempt turns a creator’s login into a reusable account.

Act

Call any resource method on that account — over the SDK or REST.

Listen

Receive activity in realtime over SSE, webhooks, or WebSocket.

Account

A connected OnlyFans creator account. You connect it once — by cookie, login, or a hosted page the creator approves — and from then on reference it by its account id and act on it without re-supplying credentials. In the SDK you construct an OnlyFans client directly from a session; the account model is what the REST API stores and manages on your behalf.

Connect attempt

A connect attempt is the lifecycle of one login. It starts pending, may park on a challenge (a verification code or device approval), and ends completed_success (with an account_id) or completed_failed. You poll an attempt until it resolves.
StateMeaning
pendingLogin is running in the background.
awaiting_mobile_sessionWaiting for the creator to approve on their device.
needs_otpSMS code required.
needs_app_otpAuthenticator (TOTP) code required.
needs_emailEmail device-verification code required.
needs_face_otpSelfie / Face ID required.
wrong_2fa_code_retryLast code was wrong; resubmit.
completed_successConnected — account_id is set.
completed_failedCould not connect.
See Two-factor & challenges.

Resource & method

The SDK groups the API into resources (users, posts, messages, earnings, …) — 38 in total. Each resource has methods that map 1:1 to API calls. The REST API exposes the same surface at /v1/accounts/{id}/{resource}/{method}.

API key, org & scope

Hosted API calls authenticate with a bearer API key. Each key belongs to an org and carries a set of scopes that gate what it can do (accounts:read, sdk:call, webhooks:write, …). See Scopes.

Realtime delivery

Account activity — messages, subscriptions, tips, posts — can reach you three ways:
  • Live stream (SSE) — subscribe over HTTP (guide).
  • Webhooks — receive signed HTTP callbacks (guide).
  • WebSocket — connect directly from the SDK (guide).