Configure webhook settings to receive real-time updates about your voice agents’ activities. Webhooks allow your application to receive automatic notifications about events like call status changes, transcripts, and recordings.
Webhook Signing Secret: A secure key used to verify that incoming webhooks are genuinely from Vogent. Keep this secret secure and use it to validate webhook signatures.
Webhook URL: The endpoint where Vogent will send webhook events. This should be a publicly accessible HTTPS URL that can receive POST requests.
For detailed information about webhook payloads and event types, visit our Webhooks documentation.
To verify the webhook signature, you need to use the webhook signing secret. The signature is included in the X-Elto-Signature header of the webhook request.
Here’s an example of how to verify the signature in JavaScript:
Webhook Signature Verification
Copy
function verifyWebhook( payload, signature, signingSecret, algorithm = 'sha256') { // Convert payload to buffer if not already const buf = Buffer.isBuffer(payload) ? payload : Buffer.from(payload, 'utf8'); // Convert signature from hex string to buffer const sig = Buffer.from(signature, 'hex'); // Create HMAC with secret const hmac = crypto.createHmac(algorithm, signingSecret); // Calculate digest of payload const digest = Buffer.from(hmac.update(buf).digest('hex'), 'hex'); // Compare calculated digest with provided signature if (sig.length !== digest.length || !crypto.timingSafeEqual(digest, sig)) { throw new Error('Invalid webhook signature'); } return true;}