Webhook Signature

You have to verify whether a request really originated from Datasaur, so we provide a signature in every request

X-Datasaur-Signature: HMAC-SHA256(secret, body)

When registering your webhook on Datasaur, you should provide a secret. We will generate a signature with the secret that you provided.

Example:

// example in node.js
const requestBody = '{"body":"sample"}';
const secret = 'secret'
const signature = crypto.createHmac('sha256', secret).update(requestBody).digest('hex');
// The signature:
// "0278b1a603de4c561ac0feb960354d0d00e8846b74813d81bddb43ad45bff767"