auth_save: Save an authentication mechanism for use in a future session

View source: R/auth.R

auth_saveR Documentation

Save an authentication mechanism for use in a future session

Description

Use auth_save() with auth_as() to avoid repeatedly entering app credentials, making it easier to share auth between projects. Use auth_list() to list all saved credentials.

Usage

auth_save(auth, name)

auth_list()

Arguments

auth

One of rtweet_app(), rtweet_bot(), or rtweet_user().

name

Name of the file to use.

Details

The tokens are saved on tools::R_user_dir("rtweet", "config").

Value

Invisible the path where the authentication is saved.

See Also

auth_sitrep() to help finding and managing authentications.

Other authentication: auth_as(), auth_get(), auth_setup_default(), rtweet_user()

Examples

## Not run: 
# save app auth for use in other sessions
auth <- rtweet_app()
auth_save(auth, "my-app")

# later, in a different session...
auth_as("my-app")
# Show all authentications stored
auth_list()

## End(Not run)

rtweet documentation built on July 21, 2022, 5:10 p.m.