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
- In the Twilio Console, select Home in the left sidebar.
- Select the Messaging product tab on your account home.
- Select Try out SMS, then select the Receive an SMS tab.
- Under Auto-reply, select Custom. The webhook fields appear.
- Enter your endpoint in Webhook URL. It must be a valid URL and it is required before you can save.
- Choose how Twilio should call it in Request method.
- Select Save. A Webhook configured successfully confirmation appears.
- Text your trial number from a verified phone. Twilio now sends the inbound message to your webhook instead of sending the standard reply.
- 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.