This site is a work in progress.
url <- ""
formData <- list("token"= Token, # API Token
content='record', # Survey responses
action='export', # Export from REDCap
format='csv',
type='flat',
csvDelimiter='',
rawOrLabel='raw', # Responses as codes or label (e.g., for multiple choice - show choice number or description)
rawOrLabelHeaders='raw', # Columns as Variable Name OR Field Label
exportCheckboxLabel='false', # Responses to checkbox as binary code or label - only works of rawOrLabel is set to 'label'
exportSurveyFields='false', # Set to 'true' to get redcap_survey_identifier and form timestamp
exportDataAccessGroups='false', # Set to 'true' to get data access groups - only works if you have DAGs
returnFormat='xml' # 'json', 'csv' and 'xml' - this setting doesn't affect exporting data
)
response <- httr::POST(url, body = formData, encode = "form")
data_exported <- httr::content(response, show_col_types = FALSE)