tw.auth | R Documentation |
Twilio Authentication Check
tw.auth( sid, token )
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! |
Object of class "request" (httr::authenticate(sid,token)
)
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.
tw.auth(sid="ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.