redcap_connection {ReviewR} | R Documentation |
REDCap Connection
Description
Overview
A 'safe' wrapper for redcapAPI::redcapConnection()
. Will return diagnostic
error codes in case incorrect URL or token are provided instead of failing
outright.
REDCap API Security
It is good practice to ensure that SSL certs are validated when utilizing the REDCap API. To ensure this happens, set the CURLOPT_SSL_VERIFYPEER' option to TRUE to avoid potential man in the middle attacks.
The redcapAPI package utilizes the httr package to perform operations using the REDCap API. Configuration options can be passed directly to httr via the config option in the redcapAPI::redcapConnection function. Here, we set 'ssl_verifypeer = 1L' to ensure cert checking is enabled.
Usage
redcap_connection(url, token)
Arguments
url |
A string containing the https URL for your institution's REDCap API. |
token |
A string containing the API token for your REDCap project. |
Value
A redcapAPI connection object if the URL and API token are correct ( See: redcapAPI::redcapConnection ). Else, return diagnostic error.