tw_get_messages: Get SMS messages.

Description Usage Arguments

View source: R/twilio.R

Description

Get SMS messages from the "https://api.twilio.com/2010-04-01/Accounts/YOUR_SID/Messages.json" endpoint. This can loop through the pagination of the messages for pulling down more than 50 messages at a time.

See here for more details.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
tw_get_messages(
  date = NULL,
  from = NULL,
  to = NULL,
  get_all = FALSE,
  verbose = FALSE,
  sid = Sys.getenv("TWILIO_SID"),
  token = Sys.getenv("TWILIO_TOKEN"),
  params = NULL,
  page_size = 50
)

Arguments

date

the date the message was sent. Defaults to NULL which gives you all dates.

from

the phone number the message was sent from. Defaults to NULL which gives you all sending phone numbers.

to

the phone number the message was sent to. Defaults to NULL which gives you all receiving phone numbers.

get_all

should we get all messages instead of the first 50? Defaults to FALSE. Caution, lots of messages will take a lot of time.

verbose

optional for verbose output. Defaults to FALSE

sid

Twilio account sid. Defaults to Sys.getenv('TWILIO_SID')

token

Twilio account token. Defaults to Sys.getenv('TWILIO_TOKEN')

params

optional further arguments to pass into API query. Should be a named list.

page_size

Number of messages per page to return. Defaults to 50.


happycabbage/twilior documentation built on July 5, 2021, 4:21 a.m.