Skip to main content
Your system can verify these payloads using the corresponding public key, which Callers provides. This process guarantees the integrity and authenticity of the data sent to your system.

Overview of the Process

Signed Webhooks

Each webhook sent by Callers is securely signed using a cryptographic process. Callers utilizes HMAC (Hash-based Message Authentication Code) with the SHA-256 algorithm for signing. The procedure involves using both the webhook payload and a unique encryption key as inputs to generate a signature. This method ensures that the signature is tightly bound to the payload and the encryption key, making it both unique and secure. The resulting signature is then attached to the webhook request within a custom header named X-Signature. This setup enables the recipient to readily extract and validate the signature against the expected payload, ensuring its authenticity.

Verification Process

Upon receiving a webhook, follow these steps to verify its authenticity:
  1. Extract both the payload and the X-Signature header from the incoming request.
  2. Use the public key to verify the signature instead of computing the HMAC yourself. In this case, the public key would be used to check that the X-Signature matches a valid cryptographic signature for the received payload.
  3. Compare the result:
    • If the public key verification succeeds, then the payload is confirmed as authentic.
    • If the verification fails, the payload should be considered compromised or originating from an untrusted source and discarded.

Public Key

Ensure that your public key file is loaded into your application as shown in the examples above. Here is the public key of Callers:
public-key.pem

Validating Signature Examples

Below are detailed examples for validating the webhook payload using the public key in both JavaScript and Python.

JavaScript

Python

By implementing these steps, you can securely verify that the webhook payloads you process are genuine, ensuring reliable and secure operation of your integrations with Callers. This validation process is essential for maintaining the integrity of communications between Callers and your system.