title: What is the correct way of using RASA's API (rasa.core.processor - Encountered an exception)?
body: <p>I installed the rasa-demo code sample. For turning on the rasa API, I did:</p>
  
  <pre><code>user@User:~/rasa-demo ‹master*›$ rasa run
  No chat connector configured, falling back to the REST input channel. To connect your bot to another channel, read the docs here: https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels
  2020-06-19 13:20:02 INFO     root  - Starting Rasa server on http://localhost:5005
  2020-06-19 13:20:08 INFO     absl  - Using /var/folders/h5/9rj1zn8x4s59bk_mg_ktzv740000gn/T/tfhub_modules to cache modules.
  2020-06-19 13:20:08 INFO     absl  - Downloading TF-Hub Module 'http://models.poly-ai.com/convert/v1/model.tar.gz'.
  2020-06-19 13:20:26 INFO     absl  - Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 22.35MB
  2020-06-19 13:20:43 INFO     absl  - Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 42.35MB
  2020-06-19 13:21:02 INFO     absl  - Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 82.35MB
  2020-06-19 13:21:21 INFO     absl  - Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 118.59MB
  2020-06-19 13:21:40 INFO     absl  - Downloading http://models.poly-ai.com/convert/v1/model.tar.gz: 148.59MB
  2020-06-19 13:21:41 INFO     absl  - Downloaded http://models.poly-ai.com/convert/v1/model.tar.gz, Total size: 152.02MB
  2020-06-19 13:21:41 INFO     absl  - Downloaded TF-Hub Module 'http://models.poly-ai.com/convert/v1/model.tar.gz'.
  2020-06-19 13:22:14 INFO     root  - Rasa server is up and running.
  </code></pre>
  
  <p>How can I query as an API the chatbot? I would like be able to make a request and do the conversation through requests, instead of using the shell. So far, when I tried to make a curl to the rasa server:</p>
  
  <p>In:</p>
  
  <pre><code>user@User:~ $ curl -XPOST localhost:5005/webhooks/rest/webhook -d '{"message":"hi"}'
  </code></pre>
  
  <p>Out:</p>
  
  <pre><code>[]%
  </code></pre>
  
  <p>On the rasa run server, I get this response:</p>
  
  <pre><code>2020-06-19 13:23:17 ERROR    rasa.core.actions.action  - Failed to run custom action 'action_greet_user'. Couldn't connect to the server at 'http://localhost:5055/webhook'. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connection refused]
  2020-06-19 13:23:17 ERROR    rasa.core.processor  - Encountered an exception while running action 'action_greet_user'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
  2020-06-19 13:24:04 ERROR    rasa.core.actions.action  - Failed to run custom action 'action_greet_user'. Couldn't connect to the server at 'http://localhost:5055/webhook'. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connection refused]
  2020-06-19 13:24:04 ERROR    rasa.core.processor  - Encountered an exception while running action 'action_greet_user'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.
  </code></pre>
  
  <p>It is not working. <strong>What is the correct way to request Rasa server as an API?</strong> After reading the <a href="https://rasa.com/docs/rasa/user-guide/connectors/your-own-website/#restinput" rel="nofollow noreferrer">docs</a>, it is not clear to me how to make correct usage of the API.</p>
  
  <p>I also tried this:</p>
  
  <p>In: </p>
  
  <pre><code>import requests
  
  response = requests.get('http://localhost:5005/webhooks/rest/webhook') 
  print(response) 
  print(response.headers) 
  print(response.content)
  </code></pre>
  
  <p>Out:</p>
  
  <pre><code>&lt;Response [405]&gt;
  {'Connection': 'keep-alive', 'Keep-Alive': '5', 'Allow': 'POST', 'Access-Control-Allow-Credentials': 'true', 'Content-Length': '60', 'Content-Type': 'text/plain; charset=utf-8'}
  b'Error: Method GET not allowed for URL /webhooks/rest/webhook'
  </code></pre>