Platform server receives message from back end and sends it to mobile clients. To use push notifications service, enter templates for sending push messages and set up push notification parameters for each service in the administrator interface.
Request:
Methods: GET, POST, OPTIONS.
NOTE. To use push notifications, the user must be authenticated using Device Id.
Method: POST.
The request body contains parameters that will be used in template.
A request to send push notification can be of two types:
To a specific user:
URL: /api/v1/push/send/<template_name>/user/<user name>.
To all users subscribed to a specific message topic:
URL: /api/v1/push/send/<template_name>/topic/<message_topic_name>.
For example, for the template:
{
"aps": {
"alert": {
"title": "{{title}}",
"body": "{{body}}"
}
}
}
The corresponding request body:
{
"title": "Title text",
"body": "Body text"
}
On successful message publication:
{"status": "OK"}
See also: