Make the topic feeds work with the ntfy apps
The JSON stream now carries the event field the apps look for, sends open and keepalive events, and supports ?poll=1 and ?since= with a duration or a message id, which is how the apps catch up. Adds a walkthrough for the phone app to the README. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7994ad492c
commit
955e01333d
4 files changed
+112
-10
No files matched your search
@@ -136,6 +136,21 @@ A topic is 1 to 64 letters, digits, `-` or `_`. Publishing and subscribing both
|
||||
API key (create one on the Account page). Clients that use basic auth can send the key as the password.
|
||||
Messages are kept for `SANDBAR_MESSAGE_DAYS` (default 30).
|
||||
|
||||
`?since=` also takes unix seconds, a duration such as `10m`, or the id of the last message you have, and
|
||||
`?poll=1` returns just that replay and closes, which is how the ntfy apps catch up.
|
||||
|
||||
### Phone app (ntfy)
|
||||
|
||||
1. Create an API key on the Account page and copy it.
|
||||
2. In the ntfy app, open Settings, then Default server, and enter your Sandbar address
|
||||
(`https://sandbar.example.com`). Or tick "Use another server" when you add each subscription.
|
||||
3. Add a subscription. For a page when an escalation reaches you, use your personal topic from the Account page
|
||||
(`u-<id>`). For everything, use `alerts` and `incidents`.
|
||||
4. Under Manage users, add a user for the server. The username can be anything and the password is the API key.
|
||||
|
||||
The Android app keeps a connection open, so messages arrive at once. The iPhone app depends on ntfy.sh's push
|
||||
relay, which Sandbar does not use, so there messages arrive only when the app polls.
|
||||
|
||||
Two topics are filled for you: `alerts` gets every alert and its recovery, and `incidents` gets every incident
|
||||
update. Each person also has a personal topic (`u-<id>`, shown on the Account page). Subscribe to it in the ntfy
|
||||
app to be paged on your phone when an escalation policy reaches you.
|
||||
|
||||
Reference in new issue
Block a user