> ## 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.

# Events & payloads

> Event names, payload shape, and how to choose between SSE, webhooks, and WebSocket.

Account activity — new messages, subscriptions, tips, posts, streams — can
reach you in real time three ways. Pick based on how you run.

<CardGroup cols={3}>
  <Card title="Server-Sent Events" icon="tower-broadcast" href="/realtime/server-sent-events">
    Subscribe to a live HTTP stream from the REST API. No WebSocket client
    or public receiver needed.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/realtime/webhooks">
    Receive signed HTTP callbacks at a URL you host. Best for serverless and
    background processing.
  </Card>

  <Card title="WebSocket" icon="plug" href="/realtime/websocket">
    Connect directly from the SDK using a short-lived auth token. Lowest
    latency, you manage the connection.
  </Card>
</CardGroup>

## Which to use

|                         | SSE                   | Webhooks               | WebSocket              |
| ----------------------- | --------------------- | ---------------------- | ---------------------- |
| Surface                 | Hosted API            | Hosted API             | SDK                    |
| You host a server       | no                    | yes (a URL)            | no                     |
| Resume after disconnect | yes (`Last-Event-ID`) | n/a (push)             | reconnect              |
| Best for                | dashboards, live UIs  | serverless, async jobs | low-latency in-process |

All three deliver the same OnlyFans events; the difference is transport.

## Event names

Events use the OnlyFans event name as their type — `message`, `subscribed`,
`tips`, `postPublished`, `stream`, and more. Payloads are passed through as
`{ data, meta, ts }`.
