def post(self, basicauth_user, basicauth_pass):
        """
        Receive a Twilio request, return a TwiML response
        """
        # We check in two ways that it's really Twilio POSTing to this URL:
        # 1. Check that Twilio is sending the username and password we specified
        #    for it at https://www.twilio.com/user/account/phone-numbers/incoming
        # 2. Check that Twilio has signed its request with our secret account token
        username = 'CONFIGURE USERNAME AT TWILIO.COM AND ENTER IT HERE'
        password = 'CONFIGURE PASSWORD AT TWILIO.COM AND ENTER IT HERE'
        if basicauth_user != username or basicauth_pass != password:
            raise tornado.web.HTTPError(401, "Invalid username and password for HTTP basic authentication")

        # Construct the URL to this handler.
        # self.request.full_url() doesn't work, because Twilio sort of has a bug:
        # We tell it to POST to our URL with HTTP Authentication like this:
        #   http://username:password@b-date.me/api/twilio_request_handler
        # ... and Twilio uses *that* URL, with username and password included, as
        # part of its signature.
        # Also, if we're proxied by Nginx, then Nginx handles the HTTPS protocol and
        # connects to Tornado over HTTP
        protocol = 'https' if self.request.headers.get('X-Twilio-Ssl') == 'Enabled' else self.request.protocol
        url = '%s://%s:%s@%s%s' % (
            protocol, username, password, self.request.host, self.request.path,
        )

        if not twilio.Utils(twilio_account_sid, twilio_account_token).validateRequest(
            url,
            # arguments has lists like { 'key': [ 'value', ... ] }, so flatten them
            {
                k: self.request.arguments[k][0]
                for k in self.request.arguments
            },
            self.request.headers.get('X-Twilio-Signature'),
        ):
            logging.error("Invalid Twilio signature to %s: %s" % (
                self.request.full_url(), self.request
            ))
            raise tornado.web.HTTPError(401, "Invalid Twilio signature")

        # Do your actual processing of Twilio's POST here, using self.get_argument()

        Receive a Twilio request, return a TwiML response
        
recipes/Python/577893_Securely_processing_Twilio_requests/recipe-577893.py