Considerations for troubleshooting your Event Webhook instance:
- Start by making sure your web server is returning a 2xx response to our servers. Any other response type will result in our server retrying a POST until we receive a 2xx response or the maximum time has expired. All events are retried at increasing intervals for up to 24 hours after the event occurs.
- Next, make sure you are not blocking our IPs that are trying to POST to your server. Our IPs change often since we constantly add more machines.
- http://httpresponder.com/ is a helpful tool for debugging webhooks.
- You can use the Test Your Integration button on the Settings > Mail Settings page in the SendGrid UI to send simulated events to your callback URL. You can also send a POST from a shell using cURL - this will give you the full response your server is returning including the HTTP headers:
- If you’re not getting a response from your server, follow the steps in Getting started with the Event Webhook to test your SendGrid instance with Webhook tester. You could also use tools like ngrok, or Runscope.
It is possible to see duplicate events in the data posted by the Event Webhook.
We recommend that you use some form of deduplication when processing or storing your Event Webhook data using the
sg_event_id as a differentiator since this ID is unique for every event where
sg_event_id is present.
sg_event_id is a string up to 100 characters that is