set_api_key: Set OMOPHub API Key

View source: R/auth.R

set_api_keyR Documentation

Set OMOPHub API Key

Description

Stores the OMOPHub API key in the specified location.

Usage

set_api_key(key, store = c("env", "keyring"))

Arguments

key

The API key to store.

store

Where to store the key. One of:

  • "env": Set as environment variable for current session (default)

  • "keyring": Store securely in system keyring (requires keyring package)

Value

Invisibly returns TRUE on success.

Examples

## Not run: 
# Store in environment (current session only)
set_api_key("your_api_key")

# Store securely in keyring (persistent)
set_api_key("your_api_key", store = "keyring")

## End(Not run)

omophub documentation built on Dec. 17, 2025, 5:10 p.m.