Examples of Notifly usage
Notifly — это универсальный канал push-уведомлений для всего, что важно в вашей работе. Вместо того чтобы открывать дашборды, листать почту и проверять статусы вручную, вы получаете мгновенное сообщение на телефон, в браузер или в desktop-клиент.
В этом разделе собраны практические примеры использования, готовые к копированию. Все рецепты используют один и тот же простой HTTP-вызов:
curl -X POST "https://your-notifly.example.com/message?token=APP_TOKEN" \ -H "Content-Type: application/json" \ -d '{"title":"Заголовок","message":"Текст","priority":5}'By role
Section titled “By role”Monitoring servers, disks, services, security — everything that should “ring” when something goes wrong. Ready-made scripts for Linux, systemd, cron, Fail2ban, SSL.
How to embed notifications in frontend and backend code: production errors, completion of long-running tasks, CI/CD events, successful deploys. Examples in Node.js, Python, Go and React.
WordPress, 1С-Битрикс, Drupal, MODX — recipes for the most popular CMS: new comments, orders, user registrations, PHP errors.
Notifications from your home PC or laptop: low battery, VPN disconnect, completion of a long download, reminders, network events.
Basic setup
Section titled “Basic setup”All examples assume that you:
- Have registered at Notifly (app.notifly.ru).
- Created a channel in the admin panel and obtained an app token (prefix
A). - Installed any client receiver application: Android, web interface or CLI.
Save the token in an environment variable so you don’t have to include it in every example:
export NOTIFLY_URL="https://your-notifly.example.com"export NOTIFLY_TOKEN="AGdjfk_L.dKe8q"And then the minimal send becomes:
curl -s "$NOTIFLY_URL/message?token=$NOTIFLY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"title":"Тест","message":"Работает!"}'::: tip[Priorities]
In Notifly each message has a priority (priority, a number 0–10). Clients
interpret it differently:
| Priority | Behavior in Android client |
|---|---|
| 0–3 | Silent, no sound |
| 4–7 | Normal notification |
| 8–10 | Loud, heads-up |
Use high priority only for truly critical events. :::