External event "Trigger" is not working when rasa is deployed in Microsoft Teams

Hi,

I have deployed my rasa chatbot on teams for testing purposes. My chatbot heavily relies on external triggers which I do using POST curl commands which I achieve through “requests” with an external python script. The bot works perfectly fine with the external triggers working well when I’m testing it on the web widget using this https://github.com/botfront/rasa-webchat. But when I deployed it on Teams these external triggers don’t seem to send any message to the user. The bot replies when chatting with it in the Teams App without any issues but does not send any message when the POST request in the external python script is run. Why is this is happening? Can anyone pls help, this issue has been going on for a while and I cannot find any solution.

EDIT: I did some testing and found out when running the curl command directly through cmd, Ithe JSON response is different which i illustrated in http://jsonviewer.stack.hu/. it returns a “messages” header that does not come when the same curl is passed to the web widget.

Below is the response when curl is passed through to the teams message

This “messages” response is supposed to be on the Teams chat.

Below is the response when curl passed through to the web widget

There is no “messages” in the response.

What is different here? And how can I make this work?