Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


The request is built similar to the Remote Server API - only this time of course the request comes from PushApps system to your callback URL. 

...

 

{
"SecretToken": "YOUR SECRET TOKEN", 
"Cmd" : "DeviceUnregistered", 
"PushToken": "some push token", 
"DeviceId": "79848", 
"DeviceType": 2, 
"OSVersion": "7.1", 
"DeviceDescription": "iPhone 5s", 
"SDKVersion": "1", 
"AppVersion" : "3.1.3", 
"TimeZone" : 240 
}

 
Anchor
Device unregistered
Device unregistered
Device unregistered

Fired when device removed the option to receive notifications - through the SDK. 
Event name for the Cmd parameter: DeviceUnregistered 

Arguments

NameTypeDescription
SecretToken StringThe token received from PushApps for using the Remote API
CmdStringThe event name which was fired. 
Needs to be DeviceUnregistered for this event
DeviceId StringA unique string within this app to identify this device. Could be the IMEI in Android for example or UDID on iOS

Request example

 

{
"SecretToken": "YOUR SECRET TOKEN", 
"Cmd" : "DeviceUnregistered", 
"DeviceId": "79848" 
}

Anchor
Notification created
Notification created
Notification created

Fired once a notification was created, by the Admin console or the Remote Server API.

Event name for the Cmd parameter: NotificationCreated

Arguments

NameTypeDescription
SecretToken StringThe token received from PushApps for using the Remote API
CmdStringThe event name which was fired. 
Needs to be NotificationCreated for this event
MessageStringMessage that was provided for the notification
LinkStringLink that was provided for the notification
CustomJsonStringCustomJson that was provided for the notification
CustomJsonKeyStringCustomJsonKey that was provided for the notification
PlatformFeaturesPlatformFeaturesPlatformFeatures that were provided for the notification

Request example

 

{
 "Cmd": "NotificationCreated",
 "SecretToken": "YOUR SECRET TOKEN",
 "Message": "Hello World",
 "Link": "www.pushapps.mobi",
 "CustomJson": "myValue",
 "CustomJsonKey": "myKey",
 "PlatformFeatures": {
 "iOSBadge": "1",
 "iOSSound": "default",
 "iOSNewsstand": false,
 "iOSContentAvailable": "0",
 "AndroidTitle": "My App",
 "AndroidSound": "filename.ogg"
}
}