Send an SMS through the Twilio Messaging Service. Specifically to the "https://api.twilio.com/2010-04-01/Accounts/YOUR_SID/Messages.json" endpoint.
This is the recommended way of sending texts because it takes advantage of all the Copilot features
Which include things like matching locale and sticky sender. You also don't need need to remember which phone number to use as the sending number.
See here for more details.
1 2 3 4 5 6 7 8 | tw_send_messaging_service(
to,
message,
service_sid = Sys.getenv("TWILIO_MESSAGING_SERVICE"),
sid = Sys.getenv("TWILIO_SID"),
token = Sys.getenv("TWILIO_TOKEN"),
params = NULL
)
|
to |
the number to send the message to |
message |
the message to send |
service_sid |
messaging service sid. Defaults to |
sid |
Twilio account sid. Defaults to |
token |
Twilio account token. Defaults to |
params |
further params to pass into the API call. Should be a named list. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.