| bwr_auth {brandwatchR} | R Documentation | 
Authenticate with the Brandwatch API
Description
Authenticates using specified username and password. Also caches a local version of the authentication token unless otherwise specified.
Usage
bwr_auth(un = NULL, pw = NULL, refresh = FALSE, cache = TRUE)
Arguments
| un | Your Brandwatch Username | 
| pw | Your Brandwatch Password | 
| refresh | (Boolean) Should the token be refreshed? If no, a token will be read from a locally cached file '.bw_token' if this file is available. If no token is available, or the refresh argument is TRUE, a new token will be requested and cached from the API. | 
| cache | (Boolean) Can the token be locally cached? If TRUE, the token will be cached in the current working directory in '.bw_token'. If FALSE, the token will be not be cached locally. | 
Value
Invisibly returns the string containing the token returned by Brandwatch. Your environment variable 'BW_TOKEN' will be set to the value of your authentication token.
Examples
## Not run: bwr_auth(un = 'mickey@mouse.com', pw = 'itsasmallworld')