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

View source: R/client.R

client_saveR Documentation

Save an authentication mechanism for use in a future session

Description

Use client_save() with client_as() to avoid repeatedly entering app credentials, making it easier to share auth between projects. Use client_list() to list all saved credentials.

Usage

client_save(client)

client_list()

Arguments

client

A client rtweet_client().

Details

The tokens are saved on the clients folder in tools::R_user_dir("rtweet", "config").

Value

Invisible the path where the client is saved.

See Also

auth_sitrep() to help finding and managing authentications.

Other client: client_as(), client_get(), client_has_default()

Examples

## Not run: 
# save app client for use in other sessions
client <- rtweet_client()
client_save(client)

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

## End(Not run)

rtweet documentation built on May 29, 2024, 7:47 a.m.