The client takes a connected account’s session. Authentication is handled for you — you supply the session, the SDK does the rest.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.
Required options
| Option | Description |
|---|---|
cookie | The account’s session cookie. |
xBc | The account’s x-bc value. |
userId | Numeric OnlyFans user id for the account. |
userAgent | The user agent to send. Keep it stable per account. |
Optional options
| Option | Description |
|---|---|
fetch | A fetch-compatible function. Use it to route requests through your own transport or network egress. |
Where the session comes from
The SDK acts as a connected account, so it needs that account’scookie,
xBc, and userId. You can:
- Use the CLI
connectflow to capture them interactively. - Extract them from a logged-in browser session.
- Let the REST API handle connecting and storage for you, if you’d rather not manage sessions in your own code.