Skip to contents

Setting and retrieving secrets from the keyring

Usage

get_secret(name)

set_secret(name, secret = NULL)

Arguments

name

Name of the secret to set or retrieve as a scalar character (e.g. "nl_api_key")

secret

Optionally a character string the the secret alternatively the system will prompt the user

When working with a cluster it might be advantageous to use a specific keyring this can be done by setting the keyring_backend option in R.

The package uses the option getRad.key_prefix as a prefix to all keys stored. If you want to use multiple keys for the same api you can manipulate this option.

Value

get_secret returns a character string, set_secret TRUE if successful.