R/get_env.R

Defines functions get_sid get_token

get_sid <- function(){
  sid <- Sys.getenv("TWILIO_SID")
  if(identical(sid, "")){
    stop("Please set environmental variable TWILIO_SID.",
         call. = FALSE)
  }

  sid
}

get_token <- function(){
  token <- Sys.getenv("TWILIO_TOKEN")
  if(identical(token, "")){
    stop("Please set environmental variable TWILIO_TOKEN.",
         call. = FALSE)
  }

  token
}

Try the twilio package in your browser

Any scripts or data that you put into this service are public.

twilio documentation built on May 2, 2019, 10:58 a.m.