connectAndCheck: Connect to REDCap and verify connection

View source: R/unlockREDCap.R

connectAndCheckR Documentation

Connect to REDCap and verify connection

Description

A function that given an API_KEY and a url will create a redcapConnection object and verify that it is working with a version call. If the API key is invalid it will return NULL. If the URL is invalid or there are multiple redirects it will call stop.

Usage

connectAndCheck(key, url, ...)

Arguments

key

The API key used to connect.

url

The url of the REDCap server.

...

Additional arguments passed to redcapConnection

Value

redcapConnection established or NULL if key is invalid.

See Also

redcapConnection()

Examples

## Not run: 
connectAndCheck("<AN API KEY HERE>", "<REDCAP URL HERE>")

## End(Not run)

redcapAPI documentation built on June 8, 2025, 1:49 p.m.