BlogOneSignal Webhooks

How to Test OneSignal Webhooks

OneSignal webhooks fire on push notification events — clicked, displayed, dismissed — across web, mobile, and email channels.

OneSignal Official Webhook Docs

1. OneSignal Webhook Events

OneSignal can send the following webhook events to your endpoint:

notification.willsend
notification.shown
notification.clicked
notification.dismissed

2. Set Up a Test Endpoint with HookRay

Follow these steps to start receiving OneSignal 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 OneSignal 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 OneSignal Webhook Payload

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

payload.json
{
  "event": "notification.clicked",
  "id": "5e9f5e5e-5e5e-5e5e-5e5e-5e5e5e5e5e5e",
  "userId": "abcdef12-3456-7890-abcd-ef1234567890",
  "appId": "xyz12345-6789-0abc-def0-123456789abc",
  "timestamp": 1745420900,
  "additionalData": {
    "campaign": "spring-sale-2026",
    "deeplink": "https://example.com/sale"
  }
}

4. Common Issues & Troubleshooting

Webhook not arriving?

Check that your endpoint URL is correct and publicly accessible. OneSignal 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 OneSignal's side. Check your webhook configuration and event selection.

Need to verify webhook signatures?

OneSignal 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 OneSignal-specific fields highlighted automatically
  • Check the OneSignal webhook documentation for the complete event reference

Ready to test OneSignal webhooks?

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

Start Testing OneSignal Webhooks — Free