The following script was working fine even if the device was offline it will receive the message when going online, now if the device is offline the push notification won't arrive when the device is online. It seems that we need to specify the Expiration date !!.
I am using the following script how can I include the Expiration date request :
$url = "https://api.appery.io/rest/push/msg";
$message1 = '{"payload":{"message":"'.$message.'","badge":"1"},"status":"sent"}';
$headers = array('X-Appery-Push-Master-Key: xxxxxx-xxxxxx-xxxxx','Content-type: application/json');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $message1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);
$result = curl_exec($ch);
Where to include the Expiration date please ?
Thanks in advance