Skip to contents

Fetch the Slack token using the keyring package (if available), or an environment variable with the same name.

Usage

slack_default_token(key_name = "SLACK_API_TOKEN")

Arguments

key_name

The name of the keyring key or the environment variable.

Value

The token value as a string, or NULL (invisibly).

Examples

token <- slack_default_token()
nchar(token)
#> [1] 0