redcap_connection | R Documentation |
A 'safe' wrapper for redcapAPI::redcapConnection()
. Will return diagnostic
error codes in case incorrect URL or token are provided instead of failing
outright.
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.
redcap_connection(url, token)
url |
A string containing the https URL for your institution's REDCap API. |
token |
A string containing the API token for your REDCap project. |
A redcapAPI connection object if the URL and API token are correct ( See: redcapAPI::redcapConnection ). Else, return diagnostic error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.