googledrive (version 0.1.3)

drive_token: Produce Google token

Description

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.

Usage

drive_token(verbose = FALSE)

Arguments

verbose

Logical, indicating whether to print informative messages (default TRUE).

Value

a request object (an S3 class provided by httr)

See Also

Other low-level API functions: generate_request, make_request, process_response

Examples

Run this code
# NOT RUN {
req <- generate_request(
  "drive.files.get",
  list(fileId = "abc"),
  token = drive_token()
)
req
# }

Run the code above in your browser using DataCamp Workspace