Skip to main content
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.
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?

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.

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

Start with the webhook receiver example. Follow Verify and handle webhooks 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 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. Lifecycle events are delivered by webhook only.

Learn More