REDCapExporter_keyring {REDCapExporter}R Documentation

Set up and use of a Keyring for REDCap API Tokens

Description

Tools for checking for, and setting up, a file based keyring for storing REDCap API tokens.

Usage

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
)

Arguments

keyring

a character vector identifying the name of the keyring, defaults to "REDCapExporter"

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 Sys.info()[["user"]].

overwrite

logical, if TRUE overwrite the existing token.

Value

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.

See Also

vignette(topic = "api", package = "REDCapExporter")

Examples

## Not run: 
REDCapExporter_keyring_check()
REDCapExporter_add_api_token("Project1")
Sys.setenv(REDCap_API_TOKEN = REDCapExporter_get_api_token("Project1"))

## End(Not run)


[Package REDCapExporter version 0.2.2 Index]