auth: Authenticate user credentials

View source: R/auth.R

authR Documentation

Authenticate user credentials

Description

auth asks the API's server for a session ID (SID), which you can then pass along to either query_wos or pull_wos. Note, there are limits on how many session IDs you can get in a given period of time (roughly 5 SIDs in a 5 minute period).

Usage

auth(username = Sys.getenv("WOS_USERNAME"),
  password = Sys.getenv("WOS_PASSWORD"))

Arguments

username

Your username. Specify username = NULL if you want to use IP-based authentication.

password

Your password. Specify password = NULL if you want to use IP-based authentication.

Value

A session ID

Examples

## Not run: 

# Pass user credentials in manually:
auth("some_username", password = "some_password")

# Use the default of looking for username and password in envvars, so you
# don't have to keep specifying them in your code:
Sys.setenv(WOS_USERNAME = "some_username", WOS_PASSWORD = "some_password")
auth()

## End(Not run)

vt-arc/wosr documentation built on Sept. 27, 2022, 5:44 a.m.