Skip to contents

Stores an API key in the PARLAY_API_KEY environment variable for the current R session. All keyed endpoints read the key from that variable, so you can also set it once in your .Renviron file and never call pa_auth() at all.

Usage

pa_auth(key = NULL)

Arguments

key

Character API key from your parlay-api.com dashboard, or NULL to just check the current state.

Value

Invisibly, TRUE if a key is set after the call, otherwise FALSE.

Details

Called with no arguments, pa_auth() reports whether a key is currently set (without printing it).

See also

pa_sandbox() for keyless testing.

Examples

pa_auth() # reports whether PARLAY_API_KEY is set
if (FALSE) { # \dontrun{
pa_auth("your-api-key")
} # }