auth_setup {rtoot} | R Documentation |
Authenticate with a Mastodon instance
Description
Authenticate with a Mastodon instance
Usage
auth_setup(
instance = NULL,
type = NULL,
name = NULL,
path = NULL,
clipboard = FALSE,
verbose = TRUE,
browser = TRUE
)
Arguments
instance |
a public instance of Mastodon (e.g., mastodon.social). |
type |
Either "public" to create a public authentication or "user" to create authentication for your user (e.g., if you want to post from R or query your followers). |
name |
give the token a name, in case you want to store more than one. |
path |
path to store the token in. The default is to store tokens in the
path returned by |
clipboard |
logical, whether to export the token to the clipboard |
verbose |
logical whether to display messages |
browser |
if |
Details
If either name
or path
are set to FALSE
, the token is only
returned and not saved. If you would like to save your token as an environment variable,
please set clipboard
to TRUE
. Your token will be copied to clipboard in the environment variable
format. Please paste it into your environment file, e.g. ".Renviron", and restart
your R session.
Value
A bearer token
See Also
verify_credentials()
, convert_token_to_envvar()
Examples
## Not run:
auth_setup("mastodon.social", "public")
## End(Not run)