When an SMS message is received by one of your Twilio numbers, Twilio makes an HTTP request to the SMS Request URL configured for that number, and will be looking for directions in TwiML describing how to handle that incoming message. You must return a valid TwiML document in order to receive the SMS.
If you just want to store the inbound SMS message in your Twilio account logs, but don’t want to process the message or send a reply, you’ll just need to send back an empty <Response>.
Configuring Your Twilio Number for SMS
You can configure your number via Console.
Log into your Twilio account and navigate to the Manage Numbers section. Select the phone number where you want to receive SMS. Under “Messaging,” make sure “Configure with -> Webhooks/Twiml” is selected. Then where it says “A message comes in,” you’ll want to paste in this webhook:
That’s it! Try sending an SMS to your Twilio number. You won’t get a response, but if you check your SMS logs, you will see the SMS.