bwr_auth function

Authenticate with the Brandwatch API

Authenticate with the Brandwatch API

Authenticates using specified username and password. Also caches a local version of the authentication token unless otherwise specified.

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.

Returns

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')
  • Maintainer: Donal Phipps
  • License: MIT + file LICENSE
  • Last published: 2018-08-13