Webhook Security
Each webhook request sent carries its own signature in the header. A public key obtained from the portal or our support team can be used to validate the signature and ensure the authenticity of the request.
Your server must accept POST requests — all webhook notifications are sent via POST.
Setting Up Your Webhook URL
igloohome API Partners
Add your webhook URL on the igloohome API portal, in the Webhooks section.
iglooconnect Partners
Email dev+support@igloocompany.co to get your webhook URL set up — we'll add it right away. An iglooconnect portal for self-service webhook URL management is planned.
Signature Process
Part of the webhook request is passed through HMAC, where the resulting digest is signed using our RSA private key.
Webhook Request Validation
Given the following HTTPS request:
The webhook request signature is carried in the x-igloocompany-sha256 header, base64-encoded.
Signed Data Construction
Construct the signed data from the following fields, extracted from the request, in order:
- Method (all uppercase)
- Host
- URL Path
- Content Type
- Date
- Body
Concatenate each item, delimited by the bar (|) character. For the request above, the final concatenated payload is:
HMAC Process
Hash the constructed signed data using HMAC with the SHA-256 hashing algorithm to get the HMAC digest.
Signature Validation
Validate the HMAC digest against the signature extracted from the header and decoded, using SHA-256.
Public Key
| Property | Value |
|---|---|
| Length | 2048 |
| Cipher | RSA |
| Format | DER |
| Type | PKCS1 |
Contact dev+support@igloocompany.co to request the public key. The key you receive is base64-encoded.
Working Example
The following Node.js example (crypto library, v16.x LTS) validates the signature of an example payload with a sample public key: