RAGE-redcap API Setup
This guide explains how to securely configure access to the RAGE-redcap API using the redcapAPI
R package.
API Access
Ensure you have been granted an API token for RAGE-REDCap. If not, contact the project lead: kirstyn.brunker@glasgow.ac.uk.
- Log in to REDCap, go to Applications > API, and copy your API token for the next steps.
Using the redcapAPI
Package
- Open the
redcap-api.R
script located in theR_scripts
directory of this repository. - Run the code, which should look like this:
unlockREDCap( c(rcon = 'rage-redcap'), keyring = "rage-redcap", envir = globalenv(), url = 'https://cvr-redcap.mvls.gla.ac.uk/redcap/redcap_v15.5.15/API/' )
- A prompt will appear asking you to create a new password for the rage-redcap keyring. Enter a secure password and press OK.
- You will then be prompted to enter your API token. Paste the token you copied from REDCap.
- This establishes your API connection to the REDCap data.
- In future sessions, you will be prompted for the keyring password. Keep a record of it.
- For any scripts that need to access REDCap, simply source this script at the start:
source("R_scripts/redcap-api.R")