tw.auth: Twilio Authentication Check

View source: R/tw.auth.R

tw.authR Documentation

Twilio Authentication Check

Description

Twilio Authentication Check

Usage

tw.auth( sid, token )

Arguments

sid

twilio credentials: SID or user key. String. Don't store this in scripts!

token

twilio credentials: Auth token or user secret. String. Don't store this in scripts!

Returns

Object of class "request" (httr::authenticate(sid,token))

Permanently save twilio credentials as environment variables

Run this: usethis::edit_r_environ()

It'll open a file called .Renviron, which is saved in your home folder. (On Windows, this is of the form C:/Users/myusername/Documents/.Renviron.) Enter environment variables like so (no quotes), save, close, and restart R.

TWILIO_ACCOUNT_SID = ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TWILIO_AUTH_TOKEN = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Now you can access environment variables using Sys.getenv(), and tw.auth() works by default.

Examples


tw.auth(sid="ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")


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