AppMachine Help Center

How can we help you?

Follow

AppMachine Push Message API

AppMachine has made an API available that allows you to send push messages without needing to log into the AppMachine platform. Using the AppMachine API should present no problem to those that understand RESTful APIs.

To find the AppMachine API section:

  1. Open your app in design.appmachine.com
  2. Open the Developer section in the left vertical menu
  3. Click on Developer Access

Here you will find the access keys for the AppMachine API and the different operations that are offered within the API.

General Rules and Tips


When creating a push message you have to send the parameters as JSON content in the body of the web service request. The body should contain at least the following JSON:


{
"message": “This is a test message“,
"isEnabledIOS": true,
"isEnabledAndroid": true,
"isEnabledWindowsPhone": true
}
 
If you only want to send the notification to one specific platform (e.g. iOS) your body should be:
 
{
"message": “This is a test message“,
"isEnabledIOS": true,
"isEnabledAndroid": false,
"isEnabledWindowsPhone": false
}
 
If you would like to show a badge on the application icon (only available on iOS) you can specify this using the “badge” parameter:
 
{
"message": “This is a test message“,
"isEnabledIOS": true,
"isEnabledAndroid": true,
"isEnabledWindowsPhone": true,
“badge”: 1
}
 
If you would like to schedule your message for delivery you can include a “deliveryDateTime” parameter in the body. This parameter should be formatted according to ISO 8601 Standard.
 
{
"message": “A scheduled message“,
"deliveryDateTime": "2017-01-15T12:00:00”,
"isEnabledIOS": true,
"isEnabledAndroid": true,
"isEnabledWindowsPhone": true
}
——
Do not send notifications directly from the JavaScript on your website because this would require you to include your API keys into the JavaScript of your website. Exposing your API keys would make it possible for other people to send push notifications to your App.
 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments