An application example implementing Click to Call using Twilio. An application example that implements an Automated Survey using Twilio.
-
Clone the repository and
cd
into it.git clone git@github.com:TwilioDevEd/automated-survey-servlets.git cd automated-survey-servlets
-
The application uses Gradle to manage dependencies.
-
Set your environment variables
cp .env.example .env
No variables needed in this project
-
Configure Twilio to call your webhooks.
You will need to configure Twilio to call your application when SMSs and calls are received.
You will need to provision at least one Twilio number with SMS and voice capabilities so the application's users can trigger the survey. You can buy a number right here. Once you have a number you need to configure it to work with your application. Open the number management page and open a number's configuration by clicking on it.
-
Run the application using Gradle Gretty plugin.
./gradlew appRun
This will run the embedded Jetty application server that uses port 8080.
-
Expose the application to the wider Internet using ngrok.
ngrok http 8080
Once you have started ngrok, update your Twilio's number SMS and voice URL setting to use your ngrok hostname. It will look something like this:
http://<your-ngrok-subdomaon/survey
This application uses this Twilio helper library.
Run at the top-level directory.
./gradlew test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.