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

# Realtime

> Receive account activity as it happens — messages, subscriptions, tips, posts, and streams — over SSE, webhooks, or WebSocket.

<div className="ofk-page">
  <div className="ofk-hero">
    <div className="ofk-hero-copy">
      <h1>Realtime</h1>

      <p className="ofk-hero-sub">
        React to OnlyFans activity the moment it happens. New messages,
        subscriptions, tips, posts, and live streams can reach your app over
        Server-Sent Events, signed webhooks, or a direct WebSocket — same events,
        different transport.
      </p>

      <div className="ofk-hero-cta">
        <a className="ofk-link-primary" href="/realtime/server-sent-events">Start with SSE →</a>
        <a className="ofk-link-muted" href="/realtime/webhooks">Webhooks</a>
      </div>
    </div>
  </div>

  <div className="ofk-sec">
    <div className="ofk-sec-head">
      <div>
        <h2>Choose a transport</h2>
        <p>Pick based on where your code runs and who hosts the connection.</p>
      </div>
    </div>

    <div className="ofk-grid ofk-grid-3">
      <a className="ofk-pcard" href="/realtime/server-sent-events">
        <div className="ofk-preview">
          <div className="c">GET /v1/accounts/…/events</div>
          <div>text/event-stream</div>
          <div>Last-Event-ID resume</div>
          <div className="dim">→ no receiver URL</div>
        </div>

        <div className="ofk-pcard-body">
          <h3>Server-Sent Events</h3>
          <p>Live HTTP stream from the hosted API — great for dashboards.</p>
        </div>
      </a>

      <a className="ofk-pcard" href="/realtime/webhooks">
        <div className="ofk-preview">
          <div className="c">POST your-url</div>
          <div>signed payload</div>
          <div>async workers</div>
          <div className="dim">→ you host the endpoint</div>
        </div>

        <div className="ofk-pcard-body">
          <h3>Webhooks</h3>
          <p>Signed HTTP callbacks — ideal for serverless and background jobs.</p>
        </div>
      </a>

      <a className="ofk-pcard" href="/realtime/websocket">
        <div className="ofk-preview">
          <div className="c">wss\://…</div>
          <div>short-lived token</div>
          <div>SDK-managed socket</div>
          <div className="dim">→ lowest latency</div>
        </div>

        <div className="ofk-pcard-body">
          <h3>WebSocket</h3>
          <p>Connect from the SDK when you need in-process, low-latency events.</p>
        </div>
      </a>
    </div>
  </div>

  <div className="ofk-sec">
    <div className="ofk-sec-head">
      <div>
        <h2>Event shape</h2>
        <p>All transports deliver the same OnlyFans event names and payloads.</p>
      </div>

      <a className="ofk-see-all" href="/realtime/overview">Event reference</a>
    </div>

    <p style={{ fontSize: "0.84rem", lineHeight: 1.6, color: "rgba(255,255,255,0.55)", margin: 0 }}>
      Types mirror OnlyFans activity — <code>message</code>, <code>subscribed</code>,
      <code>tips</code>, <code>postPublished</code>, <code>stream</code>, and more.
      Each event is passed through as <code>{`{ data, meta, ts }`}</code>.
    </p>
  </div>

  <div className="h-12" />
</div>
