Can't access Rasa server via postman

I run server like that:

rasa run --enable-api

Get the following output:

2019-08-08 21:47:48 INFO engineio.server - Server initialized for sanic.

2019-08-08 21:47:48 INFO root - Starting Rasa server on http://localhost:5005

When I try to send a message to http://localhost:5005/webhooks/rest/webhook I get the following error:

sanic.exceptions.InvalidUsage: Failed when parsing body as json

Full log: dpaste: 071T936: by chapkovski@gmail.com

The message is just a simple json:

{ “sender”: “Rasa”, “message”: “Hi there!” }

What am I doing wrong?

Versions:

  • python= 3.6.8
  • rasa==1.1.8
  • rasa-core==0.14.5
  • rasa-nlu==0.15.1

Hi @chapkovski, could you please check for me the output of running curl -XPOST -d '{"message":"hello","sender":"test"}' 'http://localhost:5005/webhooks/rest/webhook' while you server is running? I want to make sure it’s not something related to the HTTP client.

Hi @fede! Thanks for your reply. I’ve just found a very stupid error, just an extra comma in JSON request. Sorry for bothering. Everything works just perfect now.

1 Like

Hi, I have configured an EC2 instance and running a rasa server inside docker container. The port 80 of the instance is attched to port 5005 to the docker container. When I hit the above command using the instance terminal I get the response as: [{“recipient_id”:“test”,“text”:“Hey! How are you?”}]

The proble is when I hit using postman with publich address of the EC2 instance and port 80. I am not able to send the request, here is the post request. http://my-ec2-public-address:80/webhooks/rest/webhook with body as: {“message”:“hello”,“sender”:“test”}

I have checked the instance security group which is configured with port 80 to get http request. What I am doing wrong?

Hi @ZohaibRamzan, please start a new topic as your query is different from this topic