You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1013 B

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wp_auth.R
\name{wp_auth}
\alias{wp_auth}
\title{Authenticate to WordPress}
\usage{
wp_auth(cache = Sys.getenv("WP_OAUTH_CACHE", unset = TRUE))
}
\arguments{
\item{cache}{either `TRUE` (to read from the default {httr} oauth cache),
`FALSE` (to not cache the oauth token), `NA` ({httr} will guess
what to do using some sensible heuristics), or a string which will
be used as a path to the cache file. You can use an environment
variable `WP_OAUTH_CACHE` to populate this value. If no value is
specified this value will default to `TRUE`.}
}
\value{
oauth token (invisibly)
}
\description{
Call this at the start of any WordPress API interaction
}
\details{
After authentication, the current running environment will contain
a copy of the token which the remaining functions will use and
the token will be returned invisibly.
}
\examples{
if (interactive()) {
wp_auth()
}
}
\references{
<https://developer.wordpress.com/docs/oauth2/>
}