API DOCUMENTATION v1.0

Sending messages

Sending messages requires a valid API Key and a registered application. If you haven\'t registered your application yet, head over to the API settings. The registration process only takes a few minutes.

POST https://a.pushnotifier.de/1/getDevices

Request

String
apiToken
Your API Token.
String
appToken
The App Token you obtained during login.

Response

String
status
Either "ok" or an error message.
Integer
code
Error Code:

0 = ok
1 = invalid API token
2 = App Token missing
3 = App Token invalid
Array
devices
List of devices, containing title, ID and model of the device.

You will need one or more of the device IDs later to send a message to a specific device.



POST https://a.pushnotifier.de/1/sendToDevice

Request

String
apiToken
Your API Token.
String
appToken
The App Token you obtained during login.
String
app
Package Name of your registered application, i.e. net.wilwheaton.app
Integer
deviceID
A device ID you want to send to.
String
type
One of the following:

MESSAGE
URL
HIDDENURL
String
content
The content of the emssage (maximum 255 bytes for iOS, 2048 bytes for Android).
String
hiddenURL
Only for type HIDDENURL: A URL to point the notification to.

Response

String
status
Either "ok" or an error message.
Integer
code
Error Code:

0 = ok
1 = invalid API token
2 = App Token missing
3 = App Token invalid
4 = Package Name missing
5 = Package Name invalid
6 = Package Name not linked with API token
7 = Device ID missing
8 = Device ID invalid
9 = Type missing or invalid

Should you receive an E-Code, please report it to mail@gidix.de.
Integer
device
(if successfully sent) ID of the device.