Rasa and Flask integration giving a <Response 403> >

My rasa is up and running on “http://localhost:5005”.

My flask is up and running and my custom chatUI on post request via flask sending json (using rest input channel)

{"sender": "Name","message": "Hi"}

to “http://localhost:5005/webhooks/rest/webhook” in data parameter.

requests.post(‘http://localhost:5005/webhooks/rest/webhook’, data= data)

Above line is my flask code and it is returning a <Response 403>. Kindly help me in solving this issue.

P.S. I am hosting all the files on Azure Cloud. The program worked fine in my local system with <Response 200>.

Hi @ritvikkhanna09, if you are hosting your server on the cloud and sending requests from somewhere else, you’ll have to replace localhost with the IP of your server, (and check that the port is still mapped to a port on that server IP – not sure how you have it deployed)

Thanks @erohmensing, I already tried that as well. But i found the issue. In the internet settings of my VM the option “ByPass proxy for local address” was checked, due to which my rasa api server and action server port could not communicate between each other internally. Un-checking the option made it work!