We've now seen how easy it is to make phone calls and work with them. Similar concepts work in order to send SMS and MMS messages, so we'll look at those next.
To send an SMS, make a POST
request to https://api.twilio.com/2010-04-01/Accounts/<your account SID>/Messages.json
with the following parameters:
Parameter |
Explanation |
---|---|
|
The phone number to be used as the caller ID for this message (it must be one of your Twilio numbers or another one you own and have verified with Twilio) |
| |
|
Note
As you might be aware, a single SMS can contain a maximum of 160 characters. If you include more than this in the Body
parameter, Twilio will automatically segment and concatenate your messages so that they arrive on the recipient's device as one (although you'll have to pay for the number of messages actually sent) as long as this is supported by their carrier...