Sending Notifications via HTTP Requests with Ntfy.sh

●3 ●6 ●10
calendar_today • schedule1 min read
— Originally published at journal.manoedinata.com

Looking to send a notification through a HTTP request? This post suits you then.

ntfy.sh is an HTTP-based notification service created by Philipp C. Heckel. Using this service, we can send any notifications to devices using HTTP requests, specifically POST or PUT. This service makes it easy for us to send notifications or alerts to our devices anywhere and anytime, such as during emergencies, security breaches, and so on.

Usage

Notifications are sent to an address called a topic. Users must subscribe to/create a topic using the mobile app, web UI, or through the API.

After creating a topic, users can send notifications that will appear on devices that are subscribed to that topic.

Example using curl:

$ curl ntfy.sh/manoe-test -X POST -d "Halo!"
{"id":"mhPWOSrOEPa6","time":1668311286,"event":"message","topic":"manoe-test","message":"Halo!"}

First notification

$ curl ntfy.sh/manoe-test -X POST \
    -H "Title: Tes Notifikasi" \
    -H "Priority: urgent" \
    -H "Tags: warning" \
    -d "Halo!"
{"id":"unEikqvUJXZm","time":1668311727,"event":"message","topic":"manoe-test","title":"Tes Notifikasi","message":"Halo!","priority":5,"tags":["warning"]}

Second notification

ntfy.sh is very useful for sending automated notifications through CLI or application integration, based on HTTP requests. ntfy.sh can be combined with automated tasks such as daily backups, storage capacity monitoring, and more.

3 Comments

0 votes
0 votes
0 votes
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

What Is SARIF and How Does It Help Security Tools Work Together?

Ganesh Kumar - Jul 4

The Privacy Gap: Why sending financial ledgers to OpenAI is broken

Pocket Portfolio - Feb 23

Retry Failed n8n API Requests Without Duplicates

floxolab - Oct 14

The Rowling-Galbraith Mystery: Testing Stylometry with Burrows’ Delta

nevmenandr - Oct 10

The Death of Smart Contract Audits: Why NexusVeritas Hunts Web3 Scammers via Behavioral DNA

VeritasLab - Jun 12
chevron_left
742 Points • 19 Badges
East Java, Indonesia • manoedinata.com
2Posts
3Comments
Just an ordinary "hooman"

Commenters (This Week)

1 comment
1 comment
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!