The rcrunch package recommends using API keys for authentication.
To get an API key for your account, follow the instructions in the crunch help desk
The rcrunch package looks for the key in the environmental variable
"R_CRUNCH_API_KEY" or the option "crunch.api.key" (see envOrOption()
for details).
One way to establish your key is to add it to your ".Renviron"
file. This file is located in your home directory (you can
use usethis::edit_r_environ()
to open the file if you have the
usethis
package installed). The .Renviron file has the name of the
environment variable, followed by an equal sign and then the value. It
is good practice to set the API host too, (usually equal to
"https://app.crunch.io/api/").
R_CRUNCH_API=https://app.crunch.io/api/
R_CRUNCH_API_KEY=YOUR_SECRET_KEY
You can either restart your session, or run readRenviron("~/.Renviron")
and then rcrunch will know to use your key going forward.