tw.incoming_phone_numbers.create: Twilio Spoke API: Purchase Phone Number

View source: R/tw.incoming_phone_numbers.R

tw.incoming_phone_numbers.createR Documentation

Twilio Spoke API: Purchase Phone Number

Description

Twilio Spoke API: Purchase Phone Number

Usage

tw.incoming_phone_numbers.create(
  sid = Sys.getenv('TWILIO_ACCOUNT_SID'),
  key = Sys.getenv('TWILIO_KEY'),
  secret = Sys.getenv('TWILIO_SECRET'),
  area_code = NA, 
  phone_number = NA,
  voice_url = '', 
  friendly_name = NA,
  verbose = FALSE )

Arguments

sid

twilio credentials: Account SID.

key

twilio credentials: Account user key.

secret

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

area_code

The desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. You must provide an area_code or a phone_number. (US and Canada only).

phone_number

The phone number to purchase specified in E.164 format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.

voice_url

The URL that we should call to answer a call to the new phone number.

friendly_name

A descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.

verbose

Print detailed progress.

Returns

?

Details

?

Examples


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

x <- tw.incoming_phone_numbers.create(
  sid, token,
  area_code = 480,
  voice_url = '',
  friendly_name = 'Working America (AZ 480)'
)
httr::content(x, "text", encoding = "UTF-8")

## End(Not run)

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