Skip to contents

Sets keys for the rest of the R session, in place of the keys set as environment variables. The metacheck apps and API call this inside each visitor's own job with the keys the visitor entered, so the keys are used for that job only.

Usage

api_keys_use(keys = list(), shared = FALSE)

Arguments

keys

a named list or character vector of keys, named by service: github, osf, dryad, researchbox, gitlab, openalex (see api_key_status()). Empty and missing keys are skipped, so the key set as an environment variable is used for those services.

shared

TRUE when the environment-variable keys belong to a shared server, so that messages call them "the key provided by metacheck"

Value

invisibly, the previous values of the options that were set, to restore them with options()

See also

Examples

old <- api_keys_use(list(github = "github_pat_...", osf = ""))
options(old)