Skip to contents

To make some direct-from-API workflows functional (e.g., Qualtrics surveys, etc.). It is necessary to quickly test whether a given R session "knows" the API token. This function returns an error if the specified token type isn't found and prints a message if one is found

Usage

token_check(api = "qualtrics", secret = TRUE)

Arguments

api

(character) API the token is for (currently only supports "qualtrics" and "github")

secret

(logical) Whether to include the token character string in the success message. FALSE prints the token, TRUE keeps it secret but returns a success message

Value

No return value, called for side effects

Examples

if (FALSE) { # \dontrun{
# Check whether a GitHub token is attached or not
token_check(api = "github", secret = TRUE)
} # }
if (FALSE) { # \dontrun{
# Check whether a Qualtrics token is attached or not
token_check(api = "qualtrics", secret = TRUE)
} # }