(In the following I’m referring to the docs here on “Sending Push”)
Hey there,
I’m currently trying to send push notifications via REST. I can send notifications via the cli, but it doesn’t work via the REST-Service. The REST-Service responds with result: queued
but my device won’t receive any notifications. So I guess the object I’m sending might be faulty. For example I’m struggling with getting the idea of the expiry value. Is it a timestamp? Is it just an amount of milliseconds until the message has to disappear?
Sadly the docs aren’t very clear on what each key/value pair means in detail.
So my questions essentially are:
- What does expiry stand for?
- What does priority stand for?
- Is there any better source than the docs?
- Do you have any idea where my fault is?
Thanks in advance!
This is the example object (which I’ve changed for my purposes in my REST-request of-course, namely the device tokens, and the authorization header and X-Ionic-Application-Id header, so really nothing is missing):
{
"tokens":[
"b284a6f7545368d2d3f753263e3e2f2b7795be5263ed7c95017f628730edeaad",
"d609f7cba82fdd0a568d5ada649cddc5ebb65f08e7fc72599d8d47390bfc0f20"
],
"notification":{
"alert":"Hello World!",
"ios":{
"badge":1,
"sound":"ping.aiff",
"expiry": 1423238641,
"priority": 10,
"contentAvailable": true,
"payload":{
"key1":"value",
"key2":"value"
}
},
"android":{
"collapseKey":"foo",
"delayWhileIdle":true,
"timeToLive":300,
"payload":{
"key1":"value",
"key2":"value"
}
}
}
}