Twilio

Integrate voice calls and SMS (text messages) into your REDCap project using a third‐party web service called Twilio. SMS and voice calls can be used to directly administer survey questions or to invite recipients to access a survey URL.

Twilio is a paid service that charges for each phone call made and for each text message sent.

Setup and Configuration

To use SMS messaging or voice calls for REDCap surveys, you must first establish a Twilio user account at Twilio.com and connect a payment method. Please make sure to disable ‘Request Inspector’ in your Twilio account.

After the account is established, submit a REDCap support request to Twilio integration for your REDCap project. You will be asked to provide:

  • The REDCap project name and ID
  • Twilio Account SID (available on your Twilio dashboard)
  • Twilio Auth Token (available on your Twilio dashboard)
  • Twilio phone number (available on your Twilio dashboard)
  • Confirmation that you have disabled Request Inspector

10DLC Registration

If you plan to use Twilio to send any text messages from 10DLC phone numbers, you’ll need to register your messaging use case. Messages from unregistered numbers are subject to filtering and higher unregistered fees, and may ultimately be blocked by telecommunications carriers.

See the Twilio A2P 10DLC Registration page for more information and instructions.

Usage

Once Twilio is enabled, you can choose to:

  1. Initiate a REDCap survey as a voice call
  2. Initiate a survey as an SMS conversation
  3. Send invitations with a survey link via SMS
  4. Send invitations via SMS to take a survey as a voice call (respondent makes call)
  5. Send survey invitations via SMS to take a survey as a voice call (respondent receives call when replying via SMS)

Any or all of these invitation delivery methods can be applied within a single project.

Voice Call Surveys

When participants take a survey as a voice call, questions are asked one at a time. The Twilio service will use text‐to‐speech technology to read the questions aloud to the participant. You may choose the language and/or dialect in which the text should be read.

Participants respond by entering numbers on their phone’s keypad. Thus, all questions must accept either numeric (integer) answers or must be multiple-choice, with numeric codes associated with each response option. For example, you might ask questions like the following:

  • “What is your age in years?”
  • “Do you like ice cream? Yes, press 1. No, press 0.”

SMS Surveys

When participants take an SMS survey, questions are asked one at a time as a text message conversation. SMS surveys allow for more question types than than voice calls, as participants can respond with any kind of alpha‐numeric text.

Much like email, SMS is not considered a secure form of communication, so you may not want to administer surveys as SMS conversations if the participant will be submitting identifying information (PHI or PII) unless you have been granted special permission from the participant to do so.

Compatibility

Most of REDCap’s standard survey features function when taking a survey via SMS or voice call, including:

  • Required fields
  • Field validation
  • Branching logic
  • The Survey Queue for multiple surveys (if Auto‐Start is enabled)
  • Email notifications and confirmations
  • The participant list
  • Automated survey invitations
  • Stop actions
  • Computer adaptive tests (CATs) downloaded from the REDCap Shared Library

One of the few survey features that is not compatible with Twilio integration is the Survey Login feature.

Cost

Twilio charges for calls and text messages based on usage. Note that no monetary transactions are made or processed by REDCap; all costs are handled by Twilio as you use its services.

It is your responsibility to maintain the funds in your Twilio account in order to ensure that the service continues to work for your REDCap project. If your Twilio account runs out of funds, the Twilio services in REDCap will cease to function.

For information on the cost of each call or SMS message, visit your Twilio account to view the rates.

Privacy & Security Info

Twilio is a third-party service, which means that all voice calls and SMS messages will be routed through Twilio’s servers. However, REDCap goes to great lengths to ensure that voice call records and SMS transcriptions do not stay in Twilio’s logs but are removed shortly after being completed. This is done for security and privacy concerns (e.g., HIPAA), so that your survey participants’ phone numbers and their survey responses do not get permanently logged on Twilio’s servers but instead remain securely in REDCap.

Attachments