Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/connections/destinations/catalog/webhooks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,24 @@ if (signature === digest) {
}
```

For Batch events, the process to authenticate these requests slightly differs as it involves verifying the X-Signature header against a hash of the **first event** in the batch.

An example of how one might authenticate batch requests would be:

```javascript
const signature = req.headers['x-signature'];
const digest = crypto
.createHmac('sha1', 'sharedsecretvalue')
.update(JSON.stringify(req.body[0]),'utf-8')
.digest('hex');

if (signature === digest) {

// do cool stuff

}
```

### SSL Certification

If your server is using HTTPS, note that our webhooks destination does not work with self-signed certs. If webhooks detects a self-signed cert it will throw an error and no request will be sent.
Expand Down