powered by
Retrieves the OMOPHub API key from multiple sources in priority order:
Explicit argument
OMOPHUB_API_KEY environment variable
OMOPHUB_API_KEY
System keyring (if keyring package is installed)
keyring
get_api_key(key = NULL)
A character string containing the API key.
Optional explicit API key. If provided, this takes precedence.
if (FALSE) { # From environment variable Sys.setenv(OMOPHUB_API_KEY = "your_api_key") key <- get_api_key() # Explicit key key <- get_api_key("your_api_key") }
Run the code above in your browser using DataLab