tw_send_message {twilio}R Documentation

Send an SMS or MMS Message

Description

Send an SMS or MMS Message

Usage

tw_send_message(to, from, body = NULL, media_url = NULL)

Arguments

to

A phone number which will receieve the message.

from

A phone number which will send the message.

body

The body of the message.

media_url

A url containing media to be sent in a message.

Value

A twilio_message object.

Examples

## Not run: 

# Set API credentials
# You only need to do this once per R session
Sys.setenv(TWILIO_SID = "M9W4Ozq8BFX94w5St5hikg7UV0lPpH8e56")
Sys.setenv(TWILIO_TOKEN = "483H9lE05V0Jr362eq1814Li2N1I424t")

# Send a simple text message
tw_send_message("2125557634", "9178675903", "Hello from R!")

# Send a picture message
tw_send_message("2125557634", "9178675903", media_url = "https://www.r-project.org/logo/Rlogo.png")

# Send a picture message with text
tw_send_message("2125557634", "9178675903", "Do you like the new logo?",
    "https://www.r-project.org/logo/Rlogo.png")


## End(Not run)

[Package twilio version 0.1.0 Index]