Skip to contents

Creates an object of class "rconn" containing the URL and token used to access a REDCap project API.

Usage

rconn(url, token, config = httr::config())

Arguments

url

URL for a REDCap database API

token

REDCap project API token (good practice to set using an environmental variable, e.g. with Sys.getenv).

config

Optional configuration settings passed to httr::POST. Defaults to httr::config().

Value

An object of class "rconn", to be passed as the first argument to most other redcap functions.

Examples

conn <- rconn(
  url = "https://redcap.msf.fr/api/",
  token = Sys.getenv("MY_REDCAP_TOKEN")
)