Skip to main content

Webhook Verification

Overview

The Webhook Verification module authenticates that webhook requests sent to your HTTP endpoints are originated by your webhook provider and intended for you.

See the full list of webhook providers that ngrok supports.

Webhook Verification is important because without it, an attacker could send malicious payloads to your upstream service which could lead to security vulnerabilities or leak confidential data.

Webhook requests that are properly authenticated by the provider will be sent to your upstream service. Other requests will be rejected with an error.

We contribute everything we learn while building this module back to the community at Webhooks.fyi.

Example Usage

Verify that incoming requests are webhooks signed by Twilio for your account.

You can also choose other supported providers like stripe, slack, shopify, github and others.

ngrok http 80 --verify-webhook twilio --verify-webhook-secret "{twilio webhook secret}"

Behavior

If a webhook request is verified, it is sent to the upstream service. If it is not, ngrok returns a 403 error response.

If there is provider-specific behavior it will be documented in the provider's integration guide.

Timestamp Tolerance

When a webhook provider provides a mechanism to prevent replay attacks by including a signed timestamp in the webhook, ngrok will reject the webhook request if the difference between the current time and the included timestamp are is outside of tolerance.

If the webhook provider's documentation suggests a tolerance value, we will use that.

Otherwise, ngrok uses a tolerance of 180 seconds.

Endpoint Verification

Some webhook providers require endpoint verification from your application before they will begin sending webhook requests. This helps providers prevent their webhook infrastructure from being used for DOS attacks.

When you configure webhook verification for the following providers, ngrok will automatically handle the endpoint verification request for your application.

  • Twitter
  • Wordline
  • Xero
  • Zoom

Reference

Configuration

ParameterDescription
Webhook ProviderThe identifier of one of ngrok's supported webhook providers
Webhook SecretThe signing key or secret token which the webhook provider supplied to you for request verification. Consult the guide for your provider to find this value.

Upstream Headers

This module does not add any upstream headers.

Errors

CodeHTTP StatusError
ERR_NGROK_3204403This error is returned if a webhook request fails verification for any reason.

Events

When the Webhook Verification module is enabled, it populates the following fields in the http_request_complete.v0 event:

Fields
webhook_verification.decision

Edges

Webhook Verification is an HTTPS Edge module which can be applied to Routes.

Pricing

Webhook Verification usage is calculated account-wide. It is not calculated on a per-endpoint basis.

PlanVerified Requests
Free500
Personal500
ProUnlimited
EnterpriseUnlimited

Supported Providers

ProviderProvider IdentifierIntegration Guide
AfterShipaftershipDocumentation
AirshipairshipDocumentation
AlchemyalchemyDocumentation
Amazon SNSsnsDocumentation
Autodesk Platform ServicesautodeskDocumentation
BitbucketbitbucketDocumentation
BoltboltDocumentation
BoxboxDocumentation
BrexbrexDocumentation
BuildkitebuildkiteDocumentation
CalendlycalendlyDocumentation
CastlecastleDocumentation
ChargifychargifyDocumentation
CircleCIcircleciDocumentation
ClearbitclearbitDocumentation
ClerkclerkDocumentation
CoinbasecoinbaseDocumentation
ContentfulcontentfulDocumentation
DocuSigndocusignDocumentation
DropboxdropboxDocumentation
Facebook Graph APIfacebook_graph_apiDocumentation
Facebook Messengerfacebook_messengerDocumentation
Frame.ioframeioDocumentation
GitHubgithubDocumentation
GitLabgitlabDocumentation
Go1go1Documentation
HerokuherokuDocumentation
Hosted HookshostedhooksDocumentation
HubsSpothubspotDocumentation
Hygraph (Formerly GraphCMS)graphcmsDocumentation
InstagraminstagramDocumentation
IntercomintercomDocumentation
Launch Darklylaunch_darklyDocumentation
MailchimpmailchimpDocumentation
MailgunmailgunDocumentation
Microsoft Teamsmicrosoft_teamsDocumentation
Modern Treasurymodern_treasuryDocumentation
MongoDBmongodbDocumentation
MuxmuxDocumentation
OrborbDocumentation
OrbitorbitDocumentation
PagerDutypagerdutyDocumentation
PinwheelpinwheelDocumentation
PlivoplivoDocumentation
PusherpusherDocumentation
SendGridsendgridDocumentation
SentrysentryDocumentation
ShopifyshopifyDocumentation
Signal Sciencessignal_sciencesDocumentation
SlackslackDocumentation
Sonatype NexussonatypeDocumentation
SquaresquareDocumentation
StripestripeDocumentation
SvixsvixDocumentation
TerraformterraformDocumentation
TikToktiktokDocumentation
Trend Micro Conformitytrendmicro_conformityDocumentation
TwiliotwilioDocumentation
TwittertwitterDocumentation
TypeformtypeformDocumentation
VMware WorkspacevmwareDocumentation
WebexwebexDocumentation
WhatsAppwhatsappDocumentation
WorldlineworldlineDocumentation
XeroxeroDocumentation
ZendeskzendeskDocumentation
ZoomzoomDocumentation

Try it out

Consult the comprehensive step-by-step integration guides we've written for every supported provider.