# Unable to call rest api to call webhook on rasa x deployment

**URL:** <https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917>\
**Category:** \[Deprecated\] Rasa X Community Edition\
**Created:** [April 2, 2020, 1:34am UTC](https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917 "2020-04-02T01:34:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![javy-kong](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@javy-kong](https://forum.rasa.com/u/javy-kong)\
**Post date:** [April 2, 2020, 1:34am UTC](https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917/1 "2020-04-02T01:34:20Z")

</div>

Got Rasa X deployed following the tutorial. From the web UI, talking to the bot works.

I’m trying to send a message through the rest api to the bot using the following command:

```auto
curl --header "Content-Type: application/json" --request POST --data '{"sender":"test","message":"Hi"}' http://localhost/core/webhooks/rest/webhook

```

Got the following error from curl:

Error: Requested URL /webhooks/rest/webhook

The following error is logged in rasa production docker:

[1] [ERROR] Exception occurred while handling uri: ‘[http://localhost/webhooks/rest/webhook](http://localhost/webhooks/rest/webhook)’ Traceback (most recent call last): File “/opt/venv/lib/python3.6/site-packages/sanic/app.py”, line 940, in handle\_request handler, args, kwargs, uri, name = self.router.get(request) File “/opt/venv/lib/python3.6/site-packages/sanic/router.py”, line 411, in get return self.\_get(request.path, request.method, “”) File “/opt/venv/lib/python3.6/site-packages/sanic/router.py”, line 475, in \_get raise NotFound(“Requested URL {} not found”.format(url)) sanic.exceptions.NotFound: Requested URL /webhooks/rest/webhook not found

How do I get this working?

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [April 2, 2020, 6:57am UTC](https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917/2 "2020-04-02T06:57:50Z")

</div>

> [@javy-kong](#):
>
> [http://localhost/core/webhooks/rest/webhook](http://localhost/core/webhooks/rest/webhook)

Why don’t you try this way:

[http://localhost:5005/webhooks/rest/webhook](http://localhost:5005/webhooks/rest/webhook)

---

<div class="post-metadata">

**Author:** ![javy-kong](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@javy-kong](https://forum.rasa.com/u/javy-kong)\
**Post date:** [April 2, 2020, 7:46am UTC](https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917/3 "2020-04-02T07:46:35Z")

</div>

> [@JiteshGaikwad](#):
>
> [http://localhost/core/webhooks/rest/webhook](http://localhost/core/webhooks/rest/webhook)

I got connection refused error if I add port 5005 to the request

---

<div class="post-metadata">

**Author:** ![JiteshGaikwad](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@JiteshGaikwad](https://forum.rasa.com/u/JiteshGaikwad)\
**Post date:** [April 2, 2020, 8:04am UTC](https://forum.rasa.com/t/unable-to-call-rest-api-to-call-webhook-on-rasa-x-deployment/26917/4 "2020-04-02T08:04:35Z")

</div>

Can you check Which port your rasa server is running?
