BlogFacebook Messenger Webhooks

How to Test Facebook Messenger Webhooks

Facebook Messenger Platform webhooks deliver incoming messages, postbacks, and delivery receipts for chatbot integrations.

Facebook Messenger Official Webhook Docs

1. Facebook Messenger Webhook Events

Facebook Messenger can send the following webhook events to your endpoint:

messages
messaging_postbacks
messaging_optins
message_deliveries
message_reads
messaging_referrals

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving Facebook Messenger webhooks for testing:

  1. Go to HookRay and click "Start Testing — Free" to get your unique webhook URL.
  2. Copy the URL (e.g., https://h.hookray.com/abc123).
  3. In your Facebook Messenger dashboard, navigate to the webhook settings and paste the HookRay URL as your endpoint.
  4. Select the events you want to receive (see list above).
  5. Trigger a test event — HookRay will show the incoming webhook in real-time.

3. Sample Facebook Messenger Webhook Payload

Here's an example of what a Facebook Messenger webhook payload looks like:

payload.json
{
  "object": "page",
  "entry": [
    {
      "id": "PAGE_ID",
      "time": 1763589000,
      "messaging": [
        {
          "sender": {
            "id": "USER_ID"
          },
          "recipient": {
            "id": "PAGE_ID"
          },
          "timestamp": 1763589000,
          "message": {
            "mid": "mid.abc123",
            "text": "Hello, I have a question!"
          }
        }
      ]
    }
  ]
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. Facebook Messenger cannot reach localhost URLs — use HookRay's cloud URL instead.

Getting 400 or 500 errors?

HookRay accepts any payload and returns 200 OK by default, so the issue is likely on Facebook Messenger's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

Facebook Messenger signs webhook requests for security. Use HookRay to capture the raw headers and body, then implement signature verification in your application code.

5. Next Steps

  • Use HookRay's webhook replay feature to re-send captured webhooks while building your handler
  • Enable smart parsing (Pro plan) to see Facebook Messenger-specific fields highlighted automatically
  • Check the Facebook Messenger webhook documentation for the complete event reference

Ready to test Facebook Messenger webhooks?

Get a free webhook URL in 5 seconds. No signup required.

Start Testing Facebook Messenger Webhooks — Free