xyzio

Posts Tagged ‘TwiML

Send an SMS from a Twilio sim via Programmable SMS

leave a comment »

Send an SMS from a Twilio sim via Programmable SMS to the outside world.

Enter this as TwiML in the SMS section of the ‘Progammable Voice and SMS’ in the settings menu for your sim.

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <!-- The from tag contains the phone number assigned to the sim -->
    <Message from="+19195551212" to="{{To}}">
     {{Body}} 
   </Message> 
</Response>

Written by M Kapoor

December 23, 2019 at 8:21 pm

Posted in Programming

Tagged with , , ,

Forward SMS to multiple phone numbers with TwiML Bin

leave a comment »

Other parameters are possible like {{FromCity}} and {{FromState}}.  You can forward to multiple numbers by duplicating the Message tag.

More details here:
https://www.twilio.com/docs/sms/twiml

<?xml version="1.0" encoding="UTF-8"?>
<Response>
    <Message to="+16623458765">Twilio: {{From}}: {{Body}}</Message>
    <Message to="+15033943032">Twilio: {{From}}: {{Body}}</Message>
</Response>

Written by M Kapoor

September 19, 2018 at 12:44 pm

Posted in twilio

Tagged with ,