Hi,

I'd like an example of a macro that can automate downloading of an .csv file from an online research survey database called Redcap. The website uses SSL and a token. I have examples of code in other languages that they provide (python, curl, php, Visual Studio), but nothing for VBA.

The information they give in the instructions is:

URL: https://redcap-dev.chop.edu/api/

Supported Request Methods: POST

Parameters (case sensitive)

Required

token: the API token specific to your REDCap project and username (each token is unique to each user for each project) - See the section above for obtaining a token for a given project
content: record
format: csv, json, xml [default]
type:
flat - output as one record per row [default]
eav - output as one data point per row

Non-longitudinal: Will have the fields - record*, field_name, value
Longitudinal: Will have the fields - record*, field_name, value, redcap_event_name
* "record" refers to the record ID for the project