Sending Push Notifications
tyckr registers all devices in Googles Cloud Messaging service, so push messages can easily be sent to a registered device via a simple tyckr API call.
API call
Simply make a HTTPS GET or POST request with the following format:
https://api.tyckr.io/v1/push?tid={tid}&pin={pin}&title={title}&msg={message}&icon={icon}&image={image}&color={color}&slot={slot}
Parameters
Key | Mandatory | Description | ||
---|---|---|---|---|
tid |
required |
The 8 digit tyckr ID of the device. |
||
pin |
required |
The 5 digit Push PIN, find it in the according device/settings section. |
||
title |
required |
The message title text. |
||
msg |
optional |
The message body / content text. |
||
icon |
optional |
An icon name to display an icon in the message, see the available icon names. |
||
image |
optional |
A valid image URL, which must be accessible by the device.
|
||
color |
optional |
Message title color in RRGGBB format like "FFA000" for Orange. |
||
slot |
optional |
Slot number (0-7), defaults to 0 |
Response Codes
Code | Description |
---|---|
200 |
Message successfully sent to Cloud Messaging service. This is no guaranty that the message will be delivered to the device. |
400 |
Format error. |
401 |
Unauthorized, the tid or pin is wrong. |
403 |
Forbidden, the IP is banned for 24h. |
404 |
Device not found in database. |
429 |
Too Many Requests, the daily quota is exceeded. |
500 |
Server error, the device token has expired or any other server errors. |
Examples
The shortest call is like:
https://api.tyckr.io/v1/push?tid=ABCDEFGH&pin=12345&title=This%20is%20a%20test%21
Send an image URL, like a still of a surveillance cam:
https://api.tyckr.io/v1/push?tid=ABCDEFGH&pin=12345&title=See%20this&image=https%3A%2F%2Fpicsum.photos%2F200