View source: R/rb_drive_auth.R
rb_drive_auth | R Documentation |
Set up app and scope for the current session
rb_drive_auth(
client = NULL,
scopes = "https://www.googleapis.com/auth/drive.file",
email = gargle::gargle_oauth_email(),
cache = gargle::gargle_oauth_cache(),
use_oob = gargle::gargle_oob_default(),
path = NULL,
token = NULL
)
client |
A Google client. See example, and dedicated gargle documentation. |
scopes |
Defaults to 'https://www.googleapis.com/auth/drive.file'. See Google api documentation for details |
email |
Optional. If specified,
Defaults to the option named |
cache |
Specifies the OAuth token cache. Defaults to the option named
|
use_oob |
Whether to use out-of-band authentication (or, perhaps, a
variant implemented by gargle and known as "pseudo-OOB") when first
acquiring the token. Defaults to the value returned by
If the OAuth client is provided implicitly by a wrapper package, its type
probably defaults to the value returned by
|
path |
JSON identifying the service account, in one of the forms
supported for the |
token |
A token with class Token2.0 or an object of
httr's class |
Nothing, used for its side effects, i.e. logging in your Google account.
if (interactive()) {
google_client <- httr::oauth_app(
"my-very-own-google-app",
key = "123456789.apps.googleusercontent.com",
secret = "abcdefghijklmnopqrstuvwxyz"
)
rb_drive_auth(google_client)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.