This function gives advanced users more control over auth.
drive_auth() gives control over tokens,
gives control of:
The googledrive auth state. The default is active, meaning all requests
are sent with a token and, if one is not already loaded, OAuth flow is
initiated. It is possible, however, to place unauthorized requests to
the Drive API, as long as you are accessing public resources. Set
FALSE to enter this state and never send a token.
The OAuth app. If you want to use your own app, setup a new project in
Google Developers Console. Follow
the instructions in
OAuth 2.0 for Mobile & Desktop Apps
to obtain your own client ID and secret. Provide these to
The API key. If googledrive auth is deactivated (see above), all requests will be sent with an API key. If you want to provide your own, setup a project as described above and follow the instructions in Setting up API keys.
drive_auth_config(active = TRUE, app = NULL, api_key = NULL, verbose = TRUE)
OAuth app. Defaults to a tidyverse app that ships with googledrive.
API key. Defaults to a key that ships with googledrive. Necessary in order to make unauthorized "token-free" requests for public resources.
Logical, indicating whether to print informative messages
A list of class
auth_config, with the current auth configuration.
drive_auth_config()#> googledrive auth state: active #> oauth app: tidyverse #> API key: set #> token: loaded