Webhook & Gotify

This what send to Gotify

Request URL: https://notify.ynm.hu
Request method: POST
Accept: */*
Connection: close
Content-Length: 1922
Content-Type: application/json
Host: notify.ynm.hu
User-Agent: Discourse/3.4.0.beta4-dev
X-Discourse-Instance: https://forum.ynm.hu
X-Discourse-Event-Id: 194
X-Discourse-Event-Type: post
X-Discourse-Event: post_destroyed

Payload

{
  "post": {
    "id": 301,
    "name": "Markus Lajos",
    "username": "markus",
    "avatar_template": "/user_avatar/forum.ynm.hu/markus/{size}/3_2.png",
    "created_at": "2024-12-29T16:53:45.524Z",
    "cooked": "<h3><a name=\"p-301-headers-1\" class=\"anchor\" href=\"#p-301-headers-1\"></a>Headers</h3>\n<pre><code class=\"lang-auto\">date: Sun, 29 Dec 2024 16:50:21 GMT\nserver: Apache\ncontent-type: application/json\ncontent-length: 88\nconnection: close\n</code></pre>\n<h3><a name=\"p-301-body-2\" class=\"anchor\" href=\"#p-301-body-2\"></a>Body</h3>\n<pre><code class=\"lang-auto\">{\"error\":\"Bad Request\",\"errorCode\":400,\"errorDescription\":\"Field 'message' is required\"}\n</code></pre>",
    "post_number": 3,
    "post_type": 1,
    "updated_at": "2024-12-29T16:53:45.524Z",
    "reply_count": 0,
    "reply_to_post_number": null,
    "quote_count": 0,
    "incoming_link_count": 0,
    "reads": 1,
    "score": 0.2,
    "topic_id": 57,
    "topic_slug": "loged-py-jellyfin-gotfy-sopel-php",
    "topic_title": "Loged.py (Jellyfin&Gotfy&Sopel) + Php",
    "category_id": 6,
    "display_username": "Markus Lajos",
    "primary_group_name": null,
    "flair_name": null,
    "flair_group_id": null,
    "version": 1,
    "user_title": "",
    "bookmarked": false,
    "raw": "### Headers\n\n```\ndate: Sun, 29 Dec 2024 16:50:21 GMT\nserver: Apache\ncontent-type: application/json\ncontent-length: 88\nconnection: close\n```\n\n### Body\n\n```\n{\"error\":\"Bad Request\",\"errorCode\":400,\"errorDescription\":\"Field 'message' is required\"}\n```",
    "moderator": true,
    "admin": true,
    "staff": true,
    "user_id": 1,
    "hidden": false,
    "trust_level": 1,
    "deleted_at": "2024-12-29T16:57:14.977Z",
    "deleted_by": {
      "id": 1,
      "username": "markus",
      "name": "Markus Lajos",
      "avatar_template": "/user_avatar/forum.ynm.hu/markus/{size}/3_2.png"
    },
    "user_deleted": false,
    "edit_reason": null,
    "wiki": false,
    "reviewable_id": null,
    "reviewable_score_count": 0,
    "reviewable_score_pending_count": 0,
    "topic_posts_count": 1,
    "topic_filtered_posts_count": 1,
    "topic_archetype": "regular",
    "category_slug": "ynm-ai-sopel-plugins"
  }
}

This is what response Gotify

Headers

date: Sun, 29 Dec 2024 16:57:15 GMT
server: Apache
content-type: application/json
content-length: 73
connection: close

Body

{"error":"Not Found","errorCode":404,"errorDescription":"page not found"}

So its not contain “message” i think, can you fix that?

Please describe your intentions and the actions you have taken to achieve them.

4 Likes

I didnt do nothing i add webhook, and he dosent send to gotify beacuse dosent send “message” without that gotify dosent accept the hook,