[GH-ISSUE #55] Webhooks: GET requests for simple pings without messages #48

Closed
opened 2026-05-07 00:19:06 +02:00 by BreizhHardware · 3 comments

Originally created by @kzshantonu on GitHub (Dec 14, 2021).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/55

I propose allowing GET requests with no parameters to send simple ping notification without message. Quicker to type in terminal when someone wants a notification but not necessarily a message

Originally created by @kzshantonu on GitHub (Dec 14, 2021). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/55 I propose allowing GET requests with no parameters to send simple ping notification without message. Quicker to type in terminal when someone wants a notification but not necessarily a message
Author
Owner

@binwiederhier commented on GitHub (Dec 14, 2021):

Thank you for creating a ticket.

What you are describing is a webhook, which has come up before. I do think that it's relatively easy to implement, and it's likely worth it.

I'd likely suggest to add optional parameters though, so that you could, if you wanted to, add message/priority/etc in GET parameters too.

@kzshantonu As for the "empty message", I have some weird "is message empty" checks in the codebase that I'd rather not touch. Is that a hard requirement for you? Or is it just that you don't care about the message?

I picture this:

$ curl ntfy.sh/mytopic/send
{"id":"P3xJVUBGky","time":1639448146,"event":"message","topic":"mytopic","message":"triggered"}

Which would be equivalent to this:

$ curl -d "triggered" ntfy.sh/mytopic
{"id":"P3xJVUBGky","time":1639448146,"event":"message","topic":"mytopic","message":"triggered"}

I do acknowledge that it's a little weird to have the word "triggered", but it would make it significantly easier to impement to have something non-empty.

Optionally, we could then add parameters:

$ curl ntfy.sh/mytopic/send?message=This+is+a+message&title=This+is+a+title&priority=5&tags=tag1,tag2
<!-- gh-comment-id:993092631 --> @binwiederhier commented on GitHub (Dec 14, 2021): Thank you for creating a ticket. What you are describing is a webhook, which has come up before. I do think that it's relatively easy to implement, and it's likely worth it. I'd likely suggest to add optional parameters though, so that you could, if you wanted to, add message/priority/etc in GET parameters too. @kzshantonu As for the "empty message", I have some weird "is message empty" checks in the codebase that I'd rather not touch. Is that a hard requirement for you? Or is it just that you don't care about the message? I picture this: ``` $ curl ntfy.sh/mytopic/send {"id":"P3xJVUBGky","time":1639448146,"event":"message","topic":"mytopic","message":"triggered"} ``` Which would be equivalent to this: ``` $ curl -d "triggered" ntfy.sh/mytopic {"id":"P3xJVUBGky","time":1639448146,"event":"message","topic":"mytopic","message":"triggered"} ``` I do acknowledge that it's a little weird to have the word "triggered", but it would make it significantly easier to impement to have something non-empty. Optionally, we could then add parameters: ``` $ curl ntfy.sh/mytopic/send?message=This+is+a+message&title=This+is+a+title&priority=5&tags=tag1,tag2 ```
Author
Owner

@kzshantonu commented on GitHub (Dec 14, 2021):

That does work. Can be any standard 'default' message. The goal is to type it out quickly in terminal

<!-- gh-comment-id:993098779 --> @kzshantonu commented on GitHub (Dec 14, 2021): That does work. Can be any standard 'default' message. The goal is to type it out quickly in terminal
Author
Owner

@binwiederhier commented on GitHub (Dec 16, 2021):

@kzshantonu Boom, it's live: https://ntfy.sh/docs/publish/#webhooks-send-via-get

<!-- gh-comment-id:995328285 --> @binwiederhier commented on GitHub (Dec 16, 2021): @kzshantonu Boom, it's live: https://ntfy.sh/docs/publish/#webhooks-send-via-get
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#48
No description provided.