Generated from the SDK source (v0.8.0) by
bun run build:docs
Access: loader.SDK.Platforms.onlyfans (or loader.SDK.get_platform("onlyfans")).
Every method has the signature (params, ctx). Pass the plugin instance as ctx, or bind once with
const api = onlyfans.bind(this) and call api.Namespace.method(params). All methods reject with an
SdkError (see core).
Namespaces
| Namespace | Description | Methods |
|---|---|---|
| Account | The authenticated account ("me") | 4 |
| Users | Other users: profiles, following, restricting, user lists | 13 |
| Messages | Direct messages (chats) | 8 |
| Content | Posts, vault, scheduled and saved items | 7 |
| Subscriptions | Fans and subscriptions | 5 |
| Feed | Home timeline and post views | 3 |
| Live | Live streams | 2 |
| Notifications | Activity notifications | 4 |
| Earnings | Revenue statistics and payouts | 5 |
| Chat | Conversations, platform-neutral (the shape every chat-capable platform shares) | 6 |
Account
The authenticated account ("me")
Account.get_me(params, ctx)
The logged-in account: id, username, profile, counters and limits.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponseMe>
Account.get_settings(params, ctx)
Account settings: privacy, notifications, 2FA, blocked countries.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponseMeSettings>
Account.get_start_date(params, ctx)
When the account started as a creator ("YYYY-MM-DD HH:MM:SS"), the earliest date the earnings statistics go back to.
| Param | Type |
|---|---|
params | {} |
Returns Promise<string>
Account.get_ip(params, ctx)
The IP address and location OnlyFans sees for this account's requests (its proxy IP, when one is assigned).
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponseIp>
Users
Other users: profiles, following, restricting, user lists
Users.get_profile(params, ctx)
A user's profile, with how they relate to the account (subscriptions both ways, lists they are on).
| Param | Type |
|---|---|
params | { user_id: string | number; view?: string; } |
Returns Promise<OfUser>
Users.get_profiles(params, ctx)
Several users at once, keyed by id (what the site uses to fill in the users of a chat list, a feed or notifications).
| Param | Type |
|---|---|
params | { user_ids: (string | number)[]; view?: OfProfileView; } |
Returns Promise<OfResponseUsersById>
Users.is_following(params, ctx)
Whether the account follows (is subscribed to) the user.
| Param | Type |
|---|---|
params | { user_id: string | number; } |
Returns Promise<boolean>
Users.follow(params, ctx)
Follows (subscribes to) a user. Free profiles only: a paid subscription needs a payment, and OnlyFans refuses it here (REJECTED).
| Param | Type |
|---|---|
params | { user_id: string | number; source?: string; } |
Returns Promise<OfUser>
Users.unfollow(params, ctx)
Unfollows (unsubscribes from) a user.
| Param | Type |
|---|---|
params | { user_id: string | number; reason_id?: number; } |
Returns Promise<OfUser>
Users.set_restricted(params, ctx)
Restricts a user (their messages and comments are hidden from the account) or lifts it.
| Param | Type |
|---|---|
params | { user_id: string | number; restricted: boolean; } |
Returns Promise<OfUser>
Users.list_social_links(params, ctx)
The social links on a user's profile. Only empty lists were recorded, so the items' shape is unknown yet.
| Param | Type |
|---|---|
params | { user_id: string | number; } |
Returns Promise<unknown[]>
Users.list_lists(params?, ctx)
The account's user lists: system lists (fans, following, muted, …) and custom ones.
| Param | Type |
|---|---|
params? | { offset?: number; limit?: number; filter?: "feed" | "chat"; related_user_id?: string | number; } |
Returns Promise<OfResponseUserLists>
Users.get_list(params, ctx)
One list with its members, e.g. "fans" or "following".
| Param | Type |
|---|---|
params | { list_id: string | number; } |
Returns Promise<OfUserListWithMembers>
Users.create_list(params, ctx)
Creates a custom user list.
| Param | Type |
|---|---|
params | { name: string; } |
Returns Promise<OfUserList<{ _view: string; id: number; }>>
Users.set_list_membership(params, ctx)
Puts a user on a custom list (member: true) or takes them off.
| Param | Type |
|---|---|
params | { list_id: string | number; user_id: string | number; member: boolean; } |
Returns Promise<OfResponseListMembership>
Users.record_profile_view(params, ctx)
Records that the account viewed a creator's profile (the counter the site sends when a profile is open).
| Param | Type |
|---|---|
params | { user_id: string | number; duration?: number; referrer?: string; } |
Returns Promise<true>
Users.record_profile_visit(params, ctx)
Records a visit to a creator's profile page.
| Param | Type |
|---|---|
params | { username: string; source?: string; } |
Returns Promise<true>
Messages
Direct messages (chats)
Messages.send_typing(params, ctx)
Shows "typing…" to a user in their chat, over the platform's socket. Server runs only (the server keeps the socket open for the whole run); resolves false when the socket isn't connected at the moment.
| Param | Type |
|---|---|
params | { user_id: string | number; } |
Returns Promise<boolean>
Messages.list_conversations(params?, ctx)
One page of conversations, most recent first.
| Param | Type |
|---|---|
params? | { offset?: number; limit?: number; order?: "recent" | "old"; } |
Returns Promise<OfResponseChats>
Messages.list_all_conversations(params?, ctx)
Every conversation (pages through nextOffset until there are no more).
| Param | Type |
|---|---|
params? | { limit?: number; max_pages?: number; } |
Returns Promise<OfChat[]>
Messages.get_conversation(params, ctx)
Messages with one user, newest first. Page back with before_id: the
id of the oldest message you have.
| Param | Type |
|---|---|
params | { partner_id: string | number; limit?: number; before_id?: string | number; } |
Returns Promise<OfResponseMessages>
Messages.send_message(params, ctx)
Sends a text message, free or pay-to-open. Media attachments aren't supported yet.
| Param | Type |
|---|---|
params | { recipient_id: string | number; message: string; price?: number; html?: boolean; } |
Returns Promise<OfMessage>
Messages.delete_message(params, ctx)
Unsends one of the account's messages (only while the site allows it,
see cancelSeconds on the message).
| Param | Type |
|---|---|
params | { message_id: string | number; partner_id: string | number; } |
Returns Promise<OfResponseSuccess>
Messages.list_queue(params, ctx)
Mass messages waiting to be sent. Only empty lists were recorded.
| Param | Type |
|---|---|
params | {} |
Returns Promise<unknown[]>
Messages.list_templates(params, ctx)
Saved message templates. Only empty lists were recorded.
| Param | Type |
|---|---|
params | {} |
Returns Promise<unknown[]>
Content
Posts, vault, scheduled and saved items
Content.list_posts(params, ctx)
One page of a creator's posts, newest first. Page back with
before_publish_time: the previous page's tailMarker.
| Param | Type |
|---|---|
params | { user_id: string | number; limit?: number; before_publish_time?: string; pinned?: boolean; counters?: boolean; } |
Returns Promise<OfResponseUserPosts>
Content.list_vault_lists(params?, ctx)
The vault's lists (Messages, Posts, Stories, Streams, custom ones) with their media counts.
| Param | Type |
|---|---|
params? | { offset?: number; limit?: number; } |
Returns Promise<OfResponseVaultLists>
Content.list_vault_media(params?, ctx)
One page of vault media, newest first. Only empty pages were recorded, so the items' shape is unknown yet.
| Param | Type |
|---|---|
params? | { list_id?: string | number; offset?: number; limit?: number; } |
Returns Promise<OfResponseVaultMedia>
Content.get_vault_processing(params, ctx)
Uploads the vault is still processing.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponseVaultProcessing>
Content.list_scheduled(params, ctx)
Scheduled posts and messages between two days.
| Param | Type |
|---|---|
params | { from_date: string; to_date: string; time_zone: string; limit?: number; } |
Returns Promise<OfResponseSchedule>
Content.get_schedule_counts(params, ctx)
Scheduled items per day between two days (the calendar's counters).
| Param | Type |
|---|---|
params | { from_date: string; to_date: string; time_zone: string; } |
Returns Promise<OfResponseSchedule>
Content.list_saved_for_later(params, ctx)
Posts or messages saved for later.
| Param | Type |
|---|---|
params | { kind: "chat" | "post"; limit?: number; } |
Returns Promise<OfResponseSchedule>
Subscriptions
Fans and subscriptions
Subscriptions.list_subscribers(params?, ctx)
One page of the account's fans, with what each spent.
| Param | Type |
|---|---|
params? | { type?: "all" | "active" | "expired"; offset?: number; limit?: number; } |
Returns Promise<OfResponseSubscriberPage>
Subscriptions.list_subscriptions(params?, ctx)
One page of the creators the account is subscribed to.
| Param | Type |
|---|---|
params? | { type?: "all" | "active" | "expired"; offset?: number; limit?: number; } |
Returns Promise<OfResponseSubscriberPage>
Subscriptions.get_counts(params, ctx)
How many fans and subscriptions the account has, by state.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponseSubscriptionCounts>
Subscriptions.list_history(params, ctx)
Every subscription period between the account and a user.
| Param | Type |
|---|---|
params | { user_id: string | number; } |
Returns Promise<OfResponseSubscriptionHistory>
Subscriptions.list_unsubscribe_reasons(params, ctx)
The reasons Users.unfollow accepts (reason_id).
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfUnsubscribeReason[]>
Feed
Home timeline and post views
Feed.list_posts(params?, ctx)
The newest posts of the creators the account follows.
| Param | Type |
|---|---|
params? | { limit?: number; } |
Returns Promise<OfResponseFeed>
Feed.list_list_posts(params, ctx)
Posts of the members of one of the account's lists, e.g. "fans".
| Param | Type |
|---|---|
params | { list_id: string | number; offset?: number; limit?: number; } |
Returns Promise<OfResponseListPosts>
Feed.record_post_view(params, ctx)
Records that the account looked at posts (the counter the site sends while posts are on screen).
| Param | Type |
|---|---|
params | { views: { post_id: string | number; duration: number; }[]; } |
Returns Promise<true>
Live
Live streams
Live.list_streams(params?, ctx)
Streams live now from creators the account follows.
| Param | Type |
|---|---|
params? | { limit?: number; } |
Returns Promise<OfResponseStreams>
Live.list_reminders(params, ctx)
Upcoming streams the account set a reminder for.
| Param | Type |
|---|---|
params | { time_zone: string; limit?: number; } |
Returns Promise<OfResponseStreams>
Notifications
Activity notifications
Notifications.list_all(params?, ctx)
One page of notifications, all or of one type. Only the page frame was recorded, so items pass through untyped.
| Param | Type |
|---|---|
params? | { type?: OfNotificationType; offset?: number; limit?: number; } |
Returns Promise<OfResponseNotifications>
Notifications.get_badge_counts(params, ctx)
Unread notifications per type.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfNotificationCounts>
Notifications.mark_read(params, ctx)
Marks one type of notifications read.
| Param | Type |
|---|---|
params | { type: OfNotificationType; } |
Returns Promise<OfResponseMarkRead>
Notifications.get_settings(params?, ctx)
Which message notifications are on, grouped.
| Param | Type |
|---|---|
params? | { group?: number; } |
Returns Promise<OfNotificationSettingsGroup[]>
Earnings
Revenue statistics and payouts
Earnings.get_chart(params, ctx)
Earnings per day between two dates, by type. The site asks for one type per call; this does the same and merges the answers.
| Param | Type |
|---|---|
params | { start_date: OfDateInput; end_date?: OfDateInput; types?: OfEarningsType[]; } |
Returns Promise<OfResponseEarningsChart>
Earnings.get_balances(params, ctx)
Payout balances: available, pending, limits and the payout schedule.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponsePayoutBalances>
Earnings.get_chargeback_ratio(params, ctx)
Share of payments charged back between two dates.
| Param | Type |
|---|---|
params | { start_date: OfDateInput; end_date?: OfDateInput; } |
Returns Promise<number>
Earnings.get_payout_eligibility(params, ctx)
Whether the account can receive payouts, or what blocks them.
| Param | Type |
|---|---|
params | {} |
Returns Promise<OfResponsePayoutEligibility>
Earnings.list_transactions(params?, ctx)
One page of earnings transactions, newest first. Page with marker:
the previous page's marker.
| Param | Type |
|---|---|
params? | { start_date?: OfDateInput; marker?: number; limit?: number; } |
Returns Promise<OfResponseTransactions>
Chat
Conversations, platform-neutral (the shape every chat-capable platform shares)
Chat.get_thread(params, ctx)
The conversation with another user, normalised (last 50 messages).
| Param | Type |
|---|---|
params | { partner_id: string; } |
Returns Promise<ChatThread>
Chat.send(params, ctx)
Sends a text message. Files aren't supported on OnlyFans yet.
| Param | Type |
|---|---|
params | { partner_id: string; text: string; files?: any[] | FileList; } |
Returns Promise<OfMessage>
Chat.is_following(params, ctx)
Whether the account follows (is subscribed to) the other party (null: unknown).
| Param | Type |
|---|---|
params | { partner_id: string; } |
Returns Promise<boolean>
Chat.set_following(params, ctx)
Follows (true) or unfollows (false) the other party; resolves once the account is in that state. Following a paid profile is refused.
| Param | Type |
|---|---|
params | { partner_id: string; follow: boolean; } |
Returns Promise<true | OfUser>
Chat.get_own_bio(params, ctx)
The account's own profile bio as plain text ('' when unknown).
| Param | Type |
|---|---|
params | any |
Returns Promise<string>
Chat.is_member_type(params)
Whether a user type is a fan (true) or a creator (false); null when
unknown. OnlyFans has no type field: pass "fan" or "performer" (from a
profile's isPerformer).
| Param | Type |
|---|---|
params | { user_type: string; } |
Returns boolean