Code a notification trigger¶
Pick a system to trigger a notification. Write code to have this system make an HTTP POST request to tattler server’s API.
In curl
the request to send notification password_changed
in scope mywebapp
to user
your@email.com
looks like this:
curl -X POST 'http://127.0.0.1:11503/notification/mywebapp/password_changed/?user=your@email.com'
Notice the 3 essential parameters:
The scope name:
mywebapp
The event name:
password_changed
The recipient ID:
your@email.com
You usually do not provide the user’s address from the triggering system. Instead, your backend systems only provide some ID (e.g. user ID) from which tattler resolves all necessary contacts by itself with an addressbook plug-in.
You currently have 3 APIs to call tattler:
an HTTP API
A high-level python API.
A low-level python API.