With Twilio’s new Add-ons marketplace developers can reap the benefits of third party APIs with the flip of a switch. The IBM Watson Message Sentiment Add-on adds sentiment analysis information to every SMS request sent to your web application.

Let’s build a Flask app that will determine the sentiment of text messages sent to your Twilio number.

Getting started

Before writing any code make sure you have:

Now let’s install the necessary third party libraries.

Run the following commands in your terminal to install Flask and the Twilio Python module, preferably in a virtual environment: