-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathgs4_token.Rd
38 lines (38 loc) · 1.21 KB
/
gs4_token.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gs4_auth.R
\name{gs4_token}
\alias{gs4_token}
\title{Produce configured token}
\usage{
gs4_token()
}
\value{
A \code{request} object (an S3 class provided by \link[httr:httr-package]{httr}).
}
\description{
For internal use or for those programming around the Sheets API.
Returns a token pre-processed with \code{\link[httr:config]{httr::config()}}. Most users
do not need to handle tokens "by hand" or, even if they need some
control, \code{\link[=gs4_auth]{gs4_auth()}} is what they need. If there is no current
token, \code{\link[=gs4_auth]{gs4_auth()}} is called to either load from cache or
initiate OAuth2.0 flow.
If auth has been deactivated via \code{\link[=gs4_deauth]{gs4_deauth()}}, \code{gs4_token()}
returns \code{NULL}.
}
\examples{
\dontshow{if (gs4_has_token()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
req <- request_generate(
"sheets.spreadsheets.get",
list(spreadsheetId = "abc"),
token = gs4_token()
)
req
\dontshow{\}) # examplesIf}
}
\seealso{
Other low-level API functions:
\code{\link{gs4_has_token}()},
\code{\link{request_generate}()},
\code{\link{request_make}()}
}
\concept{low-level API functions}