SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

How do I configure an outgoing webhook URL?

Objective

This article walks you through the guided Configure webhook flow, which adds an outgoing webhook URL and creates the webhook setting that controls how Twilio authenticates to it, connects to it, and signs its requests.

 

Product

Twilio Console

 

Environment

Twilio Console

 

Procedure

  1. In the Twilio Console, open Webhook configuration.
  2. Select Configure a webhook if you have not configured anything yet. Otherwise, select Actions, then Create setting.
  3. On Set up URL and authentication method:
  4. In Outgoing webhook URLs, enter the URL Twilio should call.
  5. In Webhook setting name, enter a name for this setting.
  6. Under Select authentication method, choose OAuth 2.0, Basic HTTP authentication, Digest HTTP authentication, or None, then fill in the fields that appear:
    • For OAuth 2.0, enter the Token endpoint URL, Client ID, and Client secret, plus Scope and Audience if your provider requires them.
    • For Basic HTTP authentication or Digest HTTP authentication, enter the User ID and Password.
  7. On Set connection properties, set the Connection timeout, Read timeout, Total timeout, Retry count, Retry policy, SNI support, and Edge location.
  8. On Select signature validation method, choose one:
  9. Pre-shared key (recommended) — Twilio creates a key when you save the setting and shows you the key SID and secret.
  10. Twilio auth token — your account's auth token is used as the secret key for validating signatures.
  11. None — no signature validation. This is not recommended.
  12. Continue past this step. Twilio creates the webhook setting, applies your authentication, connection, and signature choices, and creates a webhook URL rule for the URL you entered.
  13. On Test webhook configuration, copy and store any key SID and secret shown to you, then select Send test event to confirm Twilio can reach your URL.
  14. Finish the flow. A confirmation appears and the new setting and rule are listed on the Webhook configuration page.

 

Additional Information

  • If you choose OAuth 2.0, your webhook URLs must use HTTPS. Twilio will not connect to an HTTPS URL with a self-signed certificate, so use a certificate from a provider such as Let's Encrypt.
  • If you use basic or digest HTTP authentication, Twilio strongly recommends also using encryption. Do not include special characters in the user ID or password.
  • The key secret for a pre-shared key is shown only once, on the test step. Copy and store it securely before you leave the page.
  • Twilio signs each request using the secret you configure, and your server verifies the signature in the X-Twilio-Signature header.
  • The rule created by this flow gets 100% traffic and the next available priority. You can change it later, or add more rules.

 

This content was generated by AI and reviewed, edited, and verified by a human.

Have more questions? Submit a request
Powered by Zendesk