Page tree

Versions Compared

Key

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

General

callbacks are a great way to keep your back end always informed of interesting events in your application.

You can can supply a callback URL through the admin console to listen for the following events in the system:


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

The request has another argument called "Cmd" which indicates which event was fired.

...

 Device registered

Fired every time a device was registered into the system using the SDK.Notice – this

Icon

This event might be fired every time

...

device is

...

registered, not only for the first time.

...

You are in charge of handling multiple events per device in your system.

The parameters are equal to those being sent from the device. 
Event name for the Cmd parameter: DeviceRegistered

...

NameTypeDescription
SecretToken StringThe token received from PushApps for using the Remote API
CmdStringThe event name which was fired. 
Needs to be be DeviceRegistered for  for this event
PushToken StringThe token received from Google or Apple by the device
DeviceId StringA unique string within this app to identify this device. Could be the IMEI in Android for example or UDID on iOS
CustomIdStringCustom id that represents the device.
DeviceType DeviceType 
OSVersion StringThis device operating system version
SDKVersion StringPushapps sdk version
DeviceDescription StringThe hardware of the device, i.e "iPhone 5"
AppVersion StringThis app current version
TimeZoneIntThe device's offset from UTC in minutes. For example, UTC +01:00 will be 60

...

 

{
"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 
}
DeviceUnregisteredDeviceUnregistered

 

Anchor

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 be DeviceUnregisteredfor  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" 
}