OnlyFans API DocumentationOnlyFans API

Introduction

Receive real-time events from your OnlyFans accounts with webhooks.

OnlyFans API Webhooks

OnlyFans API webhooks let you receive events from your connected OnlyFans accounts without constantly polling the API for changes.

Instead of repeatedly checking for new messages, subscriptions, tips, or other activity, you can use OnlyFans API webhooks to receive a POST notification whenever a subscribed event occurs.

This allows your application to react to events as they happen without making unnecessary API requests, conserving your API Rate Limits and optimizing your Credit System usage.

Webhooks Guides & Resources

How OnlyFans API Webhooks Work

When a subscribed event occurs, the OnlyFans API sends a POST request to your webhook endpoint containing the event data.

For example, you can use OnlyFans webhook to:

  • Receive new message events
  • Track new subscriptions and subscription changes
  • Receive tip and transaction events
  • Monitor post interactions
  • Trigger automated workflows
  • Keep your application data in sync

Your application receives the webhook request and can then process the event based on its type and payload.

Setting Up OnlyFans API Webhooks

To start receiving webhook events:

  1. Create an Endpoint: Set up a server endpoint that accepts POST requests.
  2. Add a Webhook Destination: Add your endpoint in the OnlyFans API Dashboard.
  3. Select Events: Choose which webhook events you want to receive.
  4. Handle Events: Parse and process the incoming JSON payload in your application. See the Webhook Setup Guide for sample code and best practices.
  5. Acknowledge the Request: Return a 2xx response status after successfully receiving the webhook.

For longer-running tasks, process the event asynchronously instead of keeping the webhook request open.

Securing your Webhooks

Webhook requests should be verified before processing them in your application.

The OnlyFans API provides a webhook signature in the headers so you can verify that the request was sent by the OnlyFans API and that the payload has not been tampered with.

Refer to the Webhook Setup Guide for details on verifying webhook signatures and securing your endpoint.

On this page