You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Called to start composing a message to users by registration id. You can specify as many as you wish separated by spaces on the same line.
210
-
##Usage
211
-
MSG_USERS %Registration_id% ...
212
-
###Response
213
-
+OK - Ready to specify rest of message.
214
-
###Examples
215
-
>> MSG_USERS fQCLfBOGdh0...9k0
216
-
<< +OK
217
-
>> MSG_USERS fQCLfBOGdh0...9k0 fQCLfBOGdh0...5j1
218
-
<< +OK
208
+
##MSG
209
+
Called to start composing a message. It is followed by a list of named arguments, all of these arguments may be listed on BEGIN_MSG as well to set them as defaults for the session. Even if they are listed on BEGIN_MSG they can be overriden when calling MSG.
219
210
220
-
##MSG_TOPIC
221
-
Called to start composing a message to a topic.
222
-
##Usage
223
-
MSG_TOPIC %Topic_Name% ...
224
-
###Response
225
-
+OK - Ready to specify rest of message.
226
-
###Examples
227
-
>> MSG_TOPIC news
228
-
<< +OK
229
-
230
-
##COLLAPSE_KEY
211
+
Named arguments are specified by " %name%=%value% " where neither names nor values will have spaces in them.
212
+
213
+
###Arguments
214
+
####registration_ids
215
+
This is a comma separated list of device registrations you wish to send the message to. The list can have between 1 and 100 ids in it so you can send to a single device this way too.
This is a comma separated list of device registrations you wish to send the message to. The list can have between 1 and 100 ids in it so you can send to a single device this way too.
This is the name of a topic you wish to send the message to.
226
+
#####Examples
227
+
topic=news
228
+
229
+
####collapse_key
231
230
Sets a collapse key on the message. When the server recieves a message with a collapse key it will discard any pending messages it has with the same key. So the client will only see the most recent one when it checks in.
232
-
##Usage
233
-
COLLAPSE_KEY %Collapse_Key% ...
234
-
###Response
235
-
+OK - Ready to specify rest of message.
236
-
###Examples
237
-
>> COLLAPSE_KEY LatestUpdate
238
-
<< +OK
231
+
#####Examples
232
+
collapse_key=LatestUpdate
239
233
240
-
##HIGH_PRIORITY
241
-
If set to true the user's device will wake up to receive the message. This is used when the message is high priority but a cost it paid in battery life for the user.
242
-
##Usage
243
-
HIGH_PRIORITY True|False
244
-
###Response
245
-
+OK - Ready to specify rest of message.
246
-
###Examples
247
-
>> HIGH_PRIORITY TRUE
248
-
<< +OK
249
-
>> HIGH_PRIORITY false
250
-
<< +OK
234
+
####high_priority
235
+
Can be "true" or "false". If set to true the user's device will wake up to receive the message. This is used when the message is high priority but a cost it paid in battery life for the user.
251
236
252
-
##DELAY_WHILE_IDLE
253
-
If set to true the message will not be delivered until the user's device is active. This is used when the message can wait to be seen until the user is available.
254
-
We are not case sensitive on True/False.
255
-
##Usage
256
-
DELAY_WHILE_IDLE True|False
257
-
###Response
258
-
+OK - Ready to specify rest of message.
259
-
###Examples
260
-
>> HIGH_PRIORITY TRUE
261
-
<< +OK
262
-
>> HIGH_PRIORITY false
263
-
<< +OK
237
+
#####Examples
238
+
high_priority=true
239
+
240
+
####delay_while_idle
241
+
Can be "true" or "false". If set to true the message will not be delivered until the user's device is active. This is used when the message can wait to be seen until the user is available.
242
+
243
+
#####Examples
244
+
delay_while_idle=false
264
245
246
+
####time_to_live
247
+
The message will expire after this amount of time in seconds. The default (and max value) is four weeks. Can be between 0 and 2,419,200.
265
248
266
-
##TIME_TO_LIVE
267
-
The message will expire after this amount of time in seconds. The default (and max value) is four weeks.
268
-
##Usage
269
-
TIME_TO_LIVE[0,2419200]
270
-
###Response
271
-
+OK - Ready to specify rest of message.
272
-
-ERROR_OUT_OF_RANGE - Value provided was not in range[0,2419200].
273
-
###Examples
274
-
>> TIME_TO_LIVE 10
275
-
<< +OK
276
-
>> TIME_TO_LIVE -1
277
-
<< -ERROR_OUT_OF_RANGE
278
-
>> TIME_TO_LIVE 2500000
279
-
<< -ERROR_OUT_OF_RANGE
249
+
#####Examples
250
+
time_to_live=500
280
251
281
252
##NOTIFICATION
282
253
Notification to display to the user, is made up of a title and a body. The title is specified on the first line and the first line ends with a count of bytes in the body. We will then read the next %Body_Byte_Count% bytes (after the line break) and interpret them as the body. If there is no body specify 0 for the byte count.