tw_check_numbers: Twilio Check Numbers API

View source: R/tw_check_numbers.R

tw_check_numbersR Documentation

Twilio Check Numbers API

Description

Get classification of phones from Twilio as mobile/landline/voip. Costs $0.005 per call, which adds up!

Usage

tw_check_numbers(
  phones,
  sid = Sys.getenv('TWILIO_ACCOUNT_SID'),
  key = Sys.getenv('TWILIO_KEY'),
  secret = Sys.getenv('TWILIO_SECRET'),
  test = FALSE)

Arguments

phones

vector of 10-digit phone numbers, preferably as character strings.

sid

twilio credentials: Account SID.

key

twilio credentials: Account user key.

secret

twilio credentials: User secret. Don't store this in scripts!!!

test

test the progress bar

Details

The intermediate results are written to files in your working directory ('twilio results [date] [time].csv'), to ensure minimal loss of data if the function is interrupted.

Examples


cost_limit = 1
p <- round(runif(10, min=2345678901, max=3456789012))

# source("C:/Users/lwolberg/Desktop/.ssh/twilio_auth.R")

# Using the function:
# tw_check_numbers(p, sid = 'my_sid', token = 'my_token', test = TRUE)

# some good test data for error types:
# result <- tw_check_numbers( phones = c('7209339860','5555555555','2139416728'), sid, token) )

workingamerica/twilio documentation built on Jan. 30, 2024, 4:55 p.m.