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

# How Do I Receive OnlyFans Webhooks?

> Receive OnlyFans webhooks with OFAuth: configure a destination, verify Standard Webhooks signatures, dedupe on eventId, and handle lifecycle and Realtime events.

To receive OnlyFans webhooks, create an OFAuth webhook destination for one environment, then accept signed `POST` deliveries at your HTTPS URL. OFAuth sends two families of events: lifecycle events (`authorization.*` and `linked_account.*`) about access changes, and Realtime events (`realtime.*`) with translated OnlyFans activity such as new chat messages.

OFAuth is independent of OnlyFans. OnlyFans does not offer webhooks or a public API; OFAuth translates activity for the accounts that owners shared with your app.

## Frequently Asked Questions

**How are OFAuth webhooks signed?** With the Standard Webhooks scheme. Each delivery has `webhook-id`, `webhook-timestamp`, and `webhook-signature` headers. The signature is an HMAC-SHA256 over `${webhook-id}.${webhook-timestamp}.${body}` using the destination's `whsec_` secret.

**How fast must my endpoint respond?** Respond with a `2xx` within 10 seconds. Do the work asynchronously. Failed deliveries are retried with backoff.

**Can the same event arrive twice or out of order?** Yes. Deduplicate on `eventId`, and apply events per `linkedAccountId` in `order`. For the same linked account, a higher `order` is newer.

**Do environments share webhook destinations?** No. Each destination belongs to one environment, `sandbox`, `test`, or `live`, and has its own signing secret.

**Are lifecycle events billed?** No. Lifecycle deliveries are not billed.

## How do I create a destination?

In the dashboard, open your External Integration and add a destination:

* Choose the environment.
* Enter a plain HTTPS URL. OFAuth verifies the destination before it receives events.
* Copy the `whsec_` signing secret. It is shown once. You can rotate it later.
* Turn on **Send lifecycle events**, **Send Realtime events**, or both.

Use the dashboard’s test delivery button to check your handler. Sample deliveries carry synthetic IDs. Keep those samples out of customer records.

## What does a delivery look like?

Every event shares one envelope. `data` depends on `type`.

```json theme={null}
{
  "eventId": "...",
  "type": "linked_account.expired",
  "schemaVersion": "1",
  "order": 42,
  "occurredAt": "2026-10-12T14:30:15.143Z",
  "environment": "live",
  "integrationId": "int_example123",
  "externalOauthClientId": "external_oauth_client_example123",
  "authorizationId": "external_live_example123",
  "linkedAccountId": "conn_example123",
  "test": false,
  "data": {
    "authorization_id": "external_live_example123",
    "linked_account_id": "conn_example123",
    "reason": "provider_session_expired"
  }
}
```

`linkedAccountId` is `null` for `authorization.*` events. Lifecycle payloads carry ids only; fetch names, status, and scopes from `GET /v3/linked-accounts`.

## Which events will I receive?

| Type | Meaning |
| - | - |
| `authorization.granted` | An owner approved your app. Store `linked_account_ids` under `authorization_id`. |
| `authorization.updated` | Accounts added or removed, or scopes changed (`consent_updated`, `auto_added`). |
| `authorization.revoked` | The whole authorization ended. Delete stored refresh tokens. |
| `linked_account.expired` | One account needs a reconnect. Pause it. |
| `linked_account.reconnected` | Read current account status. Resume only when it is `connected`. |
| `linked_account.disconnected` | The account no longer works for you. Remove it. |

Realtime types include `realtime.chat_message.received`, `realtime.chat_message.liked`, `realtime.chat_typing.updated`, `realtime.inbox_counts.updated`, `realtime.post.published`, and others. They require the account to be `connected`. Payload schemas are in [Realtime OnlyFans Events](https://docs.ofauth.com/v3/api-reference/realtime/onlyfans-events.md).

## How do I verify and handle deliveries in Node.js?

Start with the [webhook receiver example](https://github.com/ofauth-source/example-node-webhooks). Follow [Verify and handle webhooks](https://docs.ofauth.com/v3/guides/webhook-handler.md) for setup and the signed destination challenge.

Before changing customer data:

1. Read the original request body and verify its signature before parsing event fields.
2. Return the exact signed challenge as plain text when OFAuth verifies the destination.
3. Save normal events to a durable database or queue before returning `2xx`. If saving fails, return an error so OFAuth can retry.
4. Use `eventId` to detect duplicates before applying an action.
5. Process saved events after the response. Apply status updates in `order` for the same linked account.

Keep environment data separate. The `test` flag alone does not distinguish sample deliveries from real Test-account events. See [Test deliveries](https://docs.ofauth.com/v3/api-reference/webhooks.md#test-deliveries) before filtering events.

For chat messages and other activity you must retain, save every event and sort by `order`. Do not discard older messages just because a newer account event arrived first.

## What about large authorizations?

A payload lists at most 100 account ids. Above that, the lists are replaced by `linked_account_ids_truncated: true` and `linked_account_count`, plus `linked_accounts_url: "/v3/linked-accounts"` while the authorization still works. Fetch the list with that authorization's access token.

## Can I receive Realtime events over a stream instead?

Yes, for one linked account at a time, over Server-Sent Events. Request `https://api.ofauth.com/v3/realtime/events?linkedAccountId=<linked-account-id>` with `Authorization: Bearer <access_token>` and `Accept: text/event-stream`. Each event carries `eventId`, `type`, `order`, and `data` like webhooks. For a web page, create a stream URL on your server with `POST /v3/realtime` and open it with `new EventSource(url)`; see [Realtime from the browser](https://docs.ofauth.com/v3/guides/realtime-browser.md). Lifecycle events are delivered by webhook only.

## Learn More

* [Webhooks](https://docs.ofauth.com/v3/api-reference/webhooks.md)
* [Linked accounts](https://docs.ofauth.com/v3/api-reference/account/linked-accounts.md)
* [Realtime OnlyFans Events](https://docs.ofauth.com/v3/api-reference/realtime/onlyfans-events.md)
* [How Do I Read and Send OnlyFans Messages Through an API?](https://docs.ofauth.com/v3/agents/playbooks/onlyfans-messages-api.md)
* [How Do I Handle Expired or Revoked OnlyFans Accounts?](https://docs.ofauth.com/v3/agents/playbooks/handle-expired-onlyfans-accounts.md)
* [What Is OFAuth?](https://docs.ofauth.com/v3/agents/playbooks/what-is-ofauth.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.