MyNixOS website logo
Description

An Interface to the Twilio API for R.

The Twilio web service provides an API for computer programs to interact with telephony. The included functions wrap the SMS and MMS portions of Twilio's API, allowing users to send and receive text messages from R. See <https://www.twilio.com/docs/> for more information.

Twilio

Travis-CI Build Status CRAN version Downloads

An interface to the Twilio API for R. You'll need to create an account at https://www.twilio.com/, then obtain an Account SID and an Auth Token.

Installation

install.packages("twilio")

Or download the latest development version:

library(ghit)
install_github("seankross/twilio[dev]")

Demos

Set Up Authentication

You should only need to do this once per session.

Sys.setenv(TWILIO_SID = "M9W4Ozq8BFX94w5St5hikg7UV0lPpH8e56")
Sys.setenv(TWILIO_TOKEN = "483H9lE05V0Jr362eq1814Li2N1I424t")

library(twilio)

Send a 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")

Get Messages List

messages <- tw_get_messages_list()

Make a Data Frame from the Messages List

sms_data <- tw_message_tbl(messages)

Get Media from a Message

media <- tw_get_message_media(sms_data$sid[1])
browseURL(media[[1]]$url)
Metadata

Version

0.1.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows