Push notifications without your own app: one line of curl
A backup finished, a deploy failed, a long job is done. You want to know on your phone without watching a terminal.
Set it up
- In the app, open Discover and add Push per curl. Give it a name, like Backups.
- The app shows its private address. Keep it like a password: whoever has it can send you pushes.
Send
The title is the whole message. The address in these examples is made up; yours is the one the app shows:
curl -fsS -d "title=Backup done" https://api.shale.app/hooks/Xv3kP9qLm2Tz7RbW4yHs8NcE1uJd6GfA5oQnRiVt0wK
Only when the command before it worked:
./backup.sh && curl -fsS -d "title=Backup done" https://api.shale.app/hooks/Xv3kP9qLm2Tz7RbW4yHs8NcE1uJd6GfA5oQnRiVt0wK
Every night from cron:
0 3 * * * /home/me/backup.sh && curl -fsS -d "title=Nightly backup done" https://api.shale.app/hooks/Xv3kP9qLm2Tz7RbW4yHs8NcE1uJd6GfA5oQnRiVt0wK
At the end of a GitHub Actions job, with the address kept as a secret:
- name: Tell my phone
if: always()
run: curl -fsS -d "title=Build ${{ job.status }}" "${{ secrets.SHALE_PUSH_URL }}"
Limits
- A title of up to 200 characters.
- 60 calls a minute and 5,000 a day, 64 KB per call. A wrong address
answers
404, the same as one that never existed. - You can replace the address in the app at any time; the old one stops working.
- Shale is not out yet: get one mail when it is released.
For other people too
To reach your team, your community or anyone who follows your channel: push notifications to your users without your own app.