WirePusher – Web API to Push Notifications

Send push notifications easily to your device… Now!

How to Send Notifications

In order to send a notification to your device, you have to define a few parameters in your request.

  • id*: your device ID, shown in the application. Up to 10 IDs separated by commas.
  • title*: this is the title that will be shown in the notification drawer
  • message*: body or content of the notification
  • type: defines the ringtone, icon and vibration pattern for the notification, you can define the types on your mobile phone under «Types»
  • action: what intent should be triggered when clicking the notification, in the form of URI
  • image_url: display an image in the notification, in the form of URI
  • message_id: (an integer) with this parameter you can overwrite a previous notification sent to your phone (if it’s still showing in your notification drawer), if not specified then no notification will be overwritten

* represents a mandatory field

note: don’t forget to url encode your parameters

Example URL:https://wirepusher.com/send?id=xxxxx&title=Alert&message=Low%20Memory%201GB&type=monitoring&action=http%3A%2F%2Fexample.tld%2Fserver&image_url=http%3A%2F%2Fexample.tld%2Fimage.png&message_id=12


How to Clear Notifications

To clear notifications from your device, send a request with the following parameters

  • id*: your device ID, shown in the application. Up to 10 IDs separated by commas.
  • type*: wirepusher_clear_notification or wirepusher_clear_all_notifications
  • message_id: (an integer) if you are clearing a notification, don’t forget to include the message_id of the notification that you want to clear

* represents a mandatory field

Example URL:https://wirepusher.com/send?id=xxxxx&type=wirepusher_clear_notification&message_id=12

Entradas relacionadas

Deja tu comentario