> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ofauth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Realtime OnlyFans Events

> Receive translated Realtime OnlyFans Events in your webhook endpoint

Realtime OnlyFans Events delivers supported translated OnlyFans activity events to your webhook endpoint. Use it when you need low-latency event delivery for product activity instead of connection lifecycle or Dynamic Rules notifications.

## Quick Reference

| Type            | Delivery | Purpose                                                 |
| --------------- | -------- | ------------------------------------------------------- |
| OnlyFans events | Webhook  | Receive supported OnlyFans activity events in real time |

## Configuration

Configure Realtime OnlyFans Events in the [OFAuth Dashboard](https://app.ofauth.com/platform/developers/webhooks):

* Set your webhook endpoint URL
* Enable Realtime OnlyFans Events
* Review delivery history and failures

<CardGroup cols={2}>
  <Card title="API Overview" icon="flask" href="/api-reference/realtime/onlyfans-events">
    Review the top-level webhook contract and integration notes
  </Card>

  <Card title="System Webhook Events" icon="webhook" href="/api-reference/system-webhook-events/overview">
    Connection lifecycle events and Dynamic Rules notifications
  </Card>
</CardGroup>

## Event Types

| Event        | Trigger                                                              |
| ------------ | -------------------------------------------------------------------- |
| `realtime.*` | A supported translated OnlyFans event was delivered through Realtime |

<Info>
  OnlyFans Events are currently in beta. The translated webhook contract is stable, and the documented event categories may expand over time as coverage grows.
</Info>

## Payload Format

Realtime OnlyFans Events deliveries share the same top-level envelope:

```json theme={null}
{
  "type": "realtime.chat_typing.updated",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "connection": {
      "id": "conn_abc123",
      "clientReferenceId": "client_ref_123"
    },
    "environment": "live",
    "eventBody": {
      "id": 123456789
    }
  }
}
```

The `data.eventBody` object contains the translated OnlyFans event payload. Route deliveries by the top-level `type`, and parse `eventBody` defensively because additional event categories may be added over time.

## Documented Event Schemas

The schema pages below are generated from the same OpenAPI spec as the webhook contract:

* [API Overview](/api-reference/realtime/onlyfans-events)
* [Typing indicator](/api-reference/realtime/beta/typing)
* [Chat message](/api-reference/realtime/beta/chat-message)
* [Inbox counts](/api-reference/realtime/beta/inbox-counts)
* [Stories](/api-reference/realtime/beta/stories)
* [System messages](/api-reference/realtime/beta/system-messages)
* [System new message](/api-reference/realtime/beta/system-new-message)
* [Chat message like](/api-reference/realtime/beta/chat-message-like)
* [Chat message delete](/api-reference/realtime/beta/chat-message-delete)
* [Toasts](/api-reference/realtime/beta/toasts)
* [Post fundraising updated](/api-reference/realtime/beta/post-fundraising-updated)
* [Chat message unlike](/api-reference/realtime/beta/chat-message-unlike)
* [Post published](/api-reference/realtime/beta/post-published)

## Delivery & Retries

* Retry policy: exponential backoff with up to 5 attempts
* Timeout: 10 seconds per request
* Ordering: best effort per webhook endpoint

Your endpoint should return a `2xx` response within 10 seconds.

## Signature Verification

Every Realtime OnlyFans Events delivery includes an `OFAuth-Signature` header:

```http theme={null}
OFAuth-Signature: t=1234567890,v1=abc123...
```

Verify requests by:

1. Extracting the timestamp (`t`) and signature (`v1`)
2. Rejecting requests older than 5 minutes
3. Computing an HMAC-SHA256 of `{timestamp}.{raw_body}` using your signing secret
4. Comparing the expected signature with a constant-time comparison

## Implementation Checklist

1. Parse the `application/json` body
2. Verify the signature before processing
3. Route the event by `type`
4. Return `2xx` within 10 seconds
5. Make handlers idempotent by storing processed event IDs

## Troubleshooting

<AccordionGroup>
  <Accordion title="Delivery failed">
    Ensure your endpoint is publicly reachable and returns a `2xx` response within 10 seconds.
  </Accordion>

  <Accordion title="Events are not arriving">
    Verify the endpoint URL and selected subscriptions in the Dashboard.
  </Accordion>

  <Accordion title="Signature verification is failing">
    Use the raw request body, not the parsed JSON body, and confirm the signing secret matches your Dashboard configuration.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="API Overview" icon="flask" href="/api-reference/realtime/onlyfans-events">
    View the top-level Realtime webhook contract
  </Card>

  <Card title="Access API" icon="shuffle" href="/api-reference/access/overview">
    Use connection IDs to read and write OnlyFans data
  </Card>

  <Card title="System Webhook Events" icon="webhook" href="/api-reference/system-webhook-events/overview">
    Connection lifecycle events and Dynamic Rules notifications
  </Card>
</CardGroup>
