401 response and records the failure in the captured event.
Supported providers
| Provider | Signature header | Algorithm |
|---|---|---|
| Stripe | Stripe-Signature | HMAC-SHA256 with timestamp |
| Shopify | X-Shopify-Hmac-Sha256 | Base64 HMAC-SHA256 |
| GitHub | X-Hub-Signature-256 | sha256=<hex> |
| Slack | X-Slack-Signature | v0=<hex> with timestamp |
| Custom | Configurable | Configurable |
Configure signature verification
Signature verification is configured through thesignatureVerification input object. The signing secret is stored separately in the signatureVerificationSecret field so it stays masked in the Apify UI.
Stripe
tolerance sets the maximum age in seconds of the request timestamp before the actor treats it as a replay attack. The default is 300 seconds (5 minutes). Accepted range is 60–3600.
Shopify
GitHub
Slack
Custom HMAC provider
Useprovider: "custom" when your provider uses HMAC but is not one of the built-in presets. You must supply the header name, algorithm, and encoding. Optionally supply timestampKey for replay protection.
| Custom field | Values | Description |
|---|---|---|
headerName | string | The request header that contains the signature |
timestampKey | string | The request header that contains the timestamp (optional) |
algorithm | sha256, sha1 | HMAC algorithm; defaults to sha256 |
encoding | hex, base64 | Signature encoding; defaults to hex |
Signature result fields on captured events
Every captured event includes two fields that reflect the outcome of signature verification:| Field | Type | Description |
|---|---|---|
signatureValid | boolean | true if the signature matched, false if it failed, absent if verification was not configured |
signatureProvider | string | The provider name, e.g. stripe, github |
/logs endpoint by these fields:
What happens on failure
When signature verification fails, the actor:- Returns a
401response to the sender - Records the event with
signatureValid: false - Optionally sends an alert to Slack or Discord if
signature_invalidis in youralertOnlist
Alert on signature failures
Add"signature_invalid" to alertOn to get notified immediately when a request fails verification: