Introduction
Receive real-time events from your Fansly accounts directly in your app with Fansly API webhooks.
Webhooks allow you to receive real-time HTTP push notifications when specific events occur within your Fansly API integration. They are ideal for synchronizing local databases or triggering automated workflows asynchronously.
Overview
Rather than continuously polling the API for updates, you can register a secure webhook URL. When a subscribed event occurs (e.g., a new message, subscription, or tip), the Fansly API will send an HTTP POST request to your endpoint containing a JSON payload with the event details.
Setting Up Webhooks
To start receiving webhooks, follow these steps:
- Create an Endpoint: Set up a server endpoint configured to accept
POSTrequests. - Configure Your Webhook: Register your endpoint URL and select your desired events in the Developer Console.
- Handle Events: Parse and process the incoming JSON webhook payload.
- Acknowledge Receipt: Promptly return a
200 OKor204 No Contentstatus code to confirm receipt of the event.
Securing Webhooks
Every webhook event sent by Fansly API includes an X-Webhook-Signature header containing a signature. When you first create a webhook, we generate a signing secret for you. Use this secret to verify the signature in each incoming request before processing the event.
Always validate the signature to ensure that the event was sent by Fansly API and has not been tampered with. Reject any request that fails verification.