Skip to main content

Overview

All Drippi webhook requests include a signature in the X-Drippi-Signature header that you must verify to ensure the request authentically came from Drippi and hasn’t been tampered with.

Signature Format

The signature is a HMAC-SHA256 hash of the request body using your webhook’s signing secret:

Getting Your Signing Secret

When you create a webhook endpoint, Drippi generates a unique signing secret for that endpoint. This secret is returned in the API response and should be stored securely in your application.

Verification Examples

Node.js

Python

PHP

Go

Security Best Practices

1. Always Verify Signatures

Never process webhook payloads without first verifying the signature. This prevents malicious actors from sending fake webhook requests.

2. Use Timing-Safe Comparison

Use timing-safe comparison functions (like crypto.timingSafeEqual() in Node.js) to prevent timing attacks when comparing signatures.

3. Store Secrets Securely

Store your webhook signing secrets in environment variables or a secure key management system. Never hardcode them in your application.

4. Use HTTPS

Always use HTTPS endpoints for your webhooks to prevent man-in-the-middle attacks.

5. Validate Payload Structure

After verifying the signature, validate that the payload structure matches the expected webhook format.

Troubleshooting

Common Issues

Signature Mismatch
  • Ensure you’re using the correct signing secret for the webhook endpoint
  • Verify you’re using the raw request body (not parsed JSON) for signature calculation
  • Check that you’re removing the ‘sha256=’ prefix from the signature header
Missing Signature Header
  • Ensure your webhook endpoint URL is correctly configured
  • Check that you’re reading the X-Drippi-Signature header (case-sensitive)
Encoding Issues
  • Use UTF-8 encoding when calculating the HMAC signature
  • Ensure consistent encoding between signature calculation and verification

Testing Your Implementation

You can test your webhook verification by:
  1. Creating a test webhook endpoint in the Drippi dashboard
  2. Triggering test events from your automations
  3. Logging successful and failed verification attempts
  4. Using webhook testing tools to send sample payloads

Next Steps

  • Webhook Events - Learn about all available webhook events and their payloads