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 send inbound SMS to my own webhook while testing?

Objective

This article shows you how to point inbound SMS on your Twilio trial phone number at your own webhook, so you can inspect the incoming request and reply with your own logic instead of Twilio's standard reply.

 

Product

Programmable Messaging

 

Environment

Twilio Console

 

Procedure

  1. In the Twilio Console, select Home in the left sidebar.
  2. Select the Messaging product tab on your account home.
  3. Select Try out SMS, then select the Receive an SMS tab.
  4. Under Auto-reply, select Custom. The webhook fields appear.
  5. Enter your endpoint in Webhook URL. It must be a valid URL and it is required before you can save.
  6. Choose how Twilio should call it in Request method.
  7. Select Save. A Webhook configured successfully confirmation appears.
  8. Text your trial number from a verified phone. Twilio now sends the inbound message to your webhook instead of sending the standard reply.
  9. To go back to the built-in reply, select Standard and select Save again. The webhook fields disappear and the saved webhook is removed.

 

Additional Information

  • You can have only one inbound SMS webhook configured at a time. It is attached to your Twilio trial phone numbers, so saving a new one replaces the previous configuration.
  • If you do not have an endpoint yet, create a temporary one with a webhook testing service so you can inspect the incoming payload, then paste that address into Webhook URL.
  • Select How do webhooks work? in the panel for an explanation of what Twilio sends and what it expects back.
  • Trial restrictions apply to inbound messages: they must come from a verified recipient, and the sender must be in your own country.
  • The same setting is available on the Try out Messaging page reached from the Messaging setup guide, under Receive an SMS, where the choice is labelled Select reply instructions with the options Standard reply and Custom.

 

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

Have more questions? Submit a request
Powered by Zendesk