Skip to content

Update index.md #6518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 27, 2024
Merged
Changes from all commits
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 you 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
Loading