# Watcher error 404 webhook

**URL:** <https://discuss.elastic.co/t/watcher-error-404-webhook/283983>\
**Category:** Kibana\
**Tags:** elastic-stack-alerting\
**Created:** [September 12, 2021, 4:44pm UTC](https://discuss.elastic.co/t/watcher-error-404-webhook/283983 "2021-09-12T16:44:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juliana\_Sabino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juliana_sabino/32/100475_2.png) [@Juliana\_Sabino](https://discuss.elastic.co/u/Juliana_Sabino)\
**Post date:** [September 12, 2021, 4:44pm UTC](https://discuss.elastic.co/t/watcher-error-404-webhook/283983/1 "2021-09-12T16:44:08Z")

</div>

Hi guys!

I'm getting the error 404 on a watcher.  
This is my webhook action:

```auto
"actions": {
    "my_webhook": {
      "webhook": {
        "scheme": "https",
        "host": "chat.googleapis.com",
        "port": 443,
        "method": "post",
        "path": "https://chat.googleapis.com/v1/spaces/AAAAHS0yhM4/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=V66l8OHmaf44qrzIbmDx8m_KtQx0AFjtcdn7clajQqE%3D",
        "params": {},
        "headers": {},
        "body": "{{ctx.watch_id}}:{{ctx.payload.hits.total}}"
      }
    }
  }

```

This is the response I'm receiving:

```auto
      {
        "id": "my_webhook",
        "type": "webhook",
        "status": "failure",
        "reason": "received [404] status code",
        "webhook": {
          "request": {
            "host": "chat.googleapis.com",
            "port": 443,
            "scheme": "https",
            "method": "post",
            "path": "mypath",
            "body": ""
          },
          "response": {
            "status": 404,
            "headers": {
              "date": [
                "Sun, 12 Sep 2021 16:42:17 GMT"
              ],
              "server": [
                "ESF"
              ],
              "expires": [
                "Mon, 01 Jan 1990 00:00:00 GMT"
              ],
              "transfer-encoding": [
                "chunked"
              ],
              "x-content-type-options": [
                "nosniff"
              ],
              "x-xss-protection": [
                "0"
              ],
              "x-frame-options": [
                "SAMEORIGIN"
              ],
              "content-type": [
                "text/html; charset=utf-8"
              ],
              "cache-control": [
                "no-cache, no-store, max-age=0, must-revalidate"
              ],
              "alt-svc": [
                "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
              ],
              "pragma": [
                "no-cache"
              ]
            },
            "body": "<h1>Not Found</h1>\n<h2>Error 404</h2>\n"
          }
        }
      }
    ]
  },

```

Could some one give me a little help, please? Thank you so much!

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 12, 2021, 4:58pm UTC](https://discuss.elastic.co/t/watcher-error-404-webhook/283983/2 "2021-09-12T16:58:10Z")

</div>

Think your path should be

```auto
"path": "/v1/spaces/AAAAHS0yhM4/messages",

```

Then You should use the `params` to put the rest of the query parameters on.

The `path` gets appended to the `host`

You should really try to test this all with postman or curl and then try and watcher.

---

<div class="post-metadata">

**Author:** ![Juliana\_Sabino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juliana_sabino/32/100475_2.png) [@Juliana\_Sabino](https://discuss.elastic.co/u/Juliana_Sabino)\
**Post date:** [September 12, 2021, 7:38pm UTC](https://discuss.elastic.co/t/watcher-error-404-webhook/283983/3 "2021-09-12T19:38:13Z")

</div>

I fixed it! Tysm!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 10, 2021, 7:38pm UTC](https://discuss.elastic.co/t/watcher-error-404-webhook/283983/4 "2021-10-10T19:38:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
