For internal use or for those programming around the Drive API. Produces a
token prepared for use with generate_request() and build_request(). Most
users do not need to handle tokens "by hand" or, even if they need some
control, drive_auth() is what they need. If there is no current token,
drive_auth() is called to either load from cache or initiate OAuth2.0 flow.
If auth has been deactivated via drive_auth_config(), drive_token()
returns NULL.
drive_token(verbose = FALSE)
| verbose | Logical, indicating whether to print informative messages
(default |
|---|
a request object (an S3 class provided by httr)
Other low-level API functions: generate_request,
make_request,
process_response
# NOT RUN { req <- generate_request( "drive.files.get", list(fileId = "abc"), token = drive_token() ) req # }