Push notifications are messages that a user can send to another user, using an APP that has BaasBox as back-end. Supported platforms are Android and iOS. There are some limitations about sent messages. These limitations are imposed by the operating system vendor. To enable the Push Notification system, please read the tutorial and see the Setting API
Enable push notifications for a device: PUT /push/device/:os/:deviceId Headers: See authorization header in the [[General Remarks|General Remarks]] Parameters
Description: This API allows to associate an user to a device, this means that from now on the user will be able to receive push notifications by the App. Both parameters are mandatory. Returns:
Send a push notification: POST /push/message/:username Headers: See authorization header in the [[General Remarks|General Remarks]] Parameters
Description: This API allows to send a push notification to another user. Body payload A JSON object like this:
{
“message”:”hi guy”
}
message field must contain the message to deliver. Please read the Push Notification tutorial to know how to handle push notifications and how to setup the BaasBox server. Note In order to work, the Push Notification system within BaasBox needs to be configured supplying some mandatory information like an API Key released by Google (for Android devices), or Push Certificates released by Apple (for iOS devices). A push notification can be delivered only if the recipient has sent its device and operating system info through the login API or the register_device API. If a user performs a login using more than a device, a push notification will be sent for each of them. Returns: