Twilio has to use proxy for outgoing request | Rasa Whatsapp integration

Hey there,

we are trying to use the Twilio for Whatsapp Integration. It is mandatory to use a proxy for outgoing requests. Is there any possibility to configure the connector to use a proxy? Or any modification to the file

Always receiving this Error Message:Max Retries exceeded, New Connection error, Unable to reach

this is similar to your solution on Slack connector has to use proxy for outgoing requests in Docker can you kindly help with twilio

Consider all my requests should go via http://x.x.x.x:1010 -> proxy

Thanks for your help.

Hi Vin,

I opened a github ticket for this request. Are you using Twilio’s Proxy REST API?

Thanks for responding, I am not using twilio proxy rest api, there is a proxy server in http: I want all the requests (traffic from rasa) to go via that proxy. I feel there has to be a modification in this file rasa/ at master · RasaHQ/rasa · GitHub

Yes exactly. Do you want to take a crack at it, or do you need more direction on where to add the change?

I need help for sure :slight_smile: please guide me on where to make changes and what to add?

It sounds like you’re need it to work as described here and here. Is that right?

If so, I think you’d add the TwilioHttpClient call with your proxy here.

Give that a try and if it works for you, send us a PR. Maybe this proxy call is only made if you specify proxy_endpoint or something like that in the endpoints.yml:

  account_sid: "ACbc2dxxxxxxxxxxxx19d54bdcd6e41186"
  auth_token: "e231c197493a7122d475b4xxxxxxxxxx"
  twilio_number: "+440123456789"  # if using WhatsApp: "whatsapp:+440123456789"
  proxy_endpoint: ""

Hey, I added the httpclient, it works, Thank you so much.