REDCapExporter_keyring | R Documentation |
Tools for checking for, and setting up, a file based keyring for storing REDCap API tokens.
REDCapExporter_keyring_check(keyring = "REDCapExporter", password = NULL)
REDCapExporter_add_api_token(
project,
keyring = "REDCapExporter",
user = NULL,
password = NULL,
overwrite = FALSE
)
REDCapExporter_get_api_token(
project,
keyring = "REDCapExporter",
user = NULL,
password = NULL
)
keyring |
a character vector identifying the name of the keyring,
defaults to |
password |
This is the password for the keyring. The default is an empty password. |
project |
the name of the REDCap project the API token is identified by. |
user |
user name to associate the token with. Defaults to
|
overwrite |
logical, if |
REDCapExporter_keyring_check
returns TRUE
, invisibly,
as does REDCapExporter_add_api_token
.
REDCapExporter_get_api_token
returns the token invisibly as not to
print the value to the console by default. Still, be careful with your
token.
vignette(topic = "api", package = "REDCapExporter")
## Not run:
# Check if a keyring exisits. If it does not, create one.
REDCapExporter_keyring_check()
# add token if it does not already exist. If a token
# already exists, then you will be told so unless overwrite is set to TRUE
REDCapExporter_add_api_token("Project1")
# get a token and set as an envrionmental variable
Sys.setenv(REDCap_API_TOKEN = REDCapExporter_get_api_token("Project1"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.