Watcher error 404 webhook

Hi guys!

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

"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:

      {
        "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!

Think your path should be

"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.

1 Like

I fixed it! Tysm!