API docs / Event reference

Live Events

Event reference

Every live event a creator's OnlyFans account sends over the WebSocket, with its payload type: messages, typing, subscribers, online fans, tips, posts and streams.

These are the events a creator's connection can receive. Listen with .on(event, handler) (see live events for setup). Payload types are exported by the SDK, so your editor shows every field.

The event names come from OnlyFans itself, which is why their styles vary. An event only arrives when it applies to the creator you're connected to.

Chats and messages

EventWhen it firesPayload
api2_chat_messageA chat message arrives. A tip sent in chat arrives here too, with isTip and tipAmount.WsChatMessage
new_messageA new message notification.WsNewMessage
typingSomeone in a chat is typing.{ id: number }
chat_message_deleteA message is deleted.string
chat_message_likeA message is liked.string
chat_message_unlikeA like is removed.string
chat_messagesThe unread chat count changes.number
count_priority_chatThe unread priority chat count changes.number
messagesThe unread message count changes.number
chat_queue_updateA mass message is still sending.WsChatQueueUpdate
chat_queue_finishA mass message finished sending.WsChatQueueFinish

Fans

EventWhen it firesPayload
subscribedSomeone subscribes.WsSubscribed (user, timestamp)
onlineUsers come online.WsOnline[]
block_userA user is blocked.WsBlockUser
unblock_userA user is unblocked.WsUnblockUser

Money

EventWhen it firesPayload
unread_tipsThe unread tips count changes.number
post_tips_updatedTips on a post change.WsPostTipsUpdated
post_fundraising_updatedA post's fundraising total changes.WsPostFundraisingUpdated
price_changedA price changes.WsPriceChanged

Posts and stories

EventWhen it firesPayload
post_publishedA post goes live.WsPostPublished
post_updatedA post is edited.string
post_expireA post expires.string
storiesStories change.WsStories[]

Streams

EventWhen it firesPayload
stream_startA live stream starts.WsStreamStart
stream_stopA live stream stops.WsStreamStop
streamLive stream details.WsStream
stream_updateA live stream changes.WsStreamUpdate

Account

EventWhen it firesPayload
connectedThe connection is ready.boolean
toastsOnlyFans shows the creator in-app notifications.WsToasts[]
faceIdOnlyFans asks for face verification.WsFaceId
logoutThe creator's OnlyFans session logged out.1

Other events

OnlyFans also sends these for its own app. They're typed like the rest, but most integrations ignore them: hasSystemNotifications, has_new_alerts, has_new_hints, newTagsCount, need_a_tag_count, display_ticket, hasNewTicketReplies, ticketReply, faceIdRegular, sync_duplicated_release_forms, syncInProcess, account_switch, user_id, v and bc.

Log everything

To see exactly what arrives for a creator while you build:

ws.onAny((event, payload) => {
  console.log(event, payload)
})