Hi,
I’m sending notifications via a cURL command to https://mysite.com/?lceps_key=xxx&send_notification
.
It was not working until I set some headers like this:
-H “Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8” -H “User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36”
That worked for a while, then it stopped working again.
It works when I send the command manually using my browser when I am logged into my site, but its not working on incognito browser window, so I was thinking maybe some authenticaiton headers or cookies are required?
Anyone know if I need to include specific authentication headers or cookies for this request to succeed? If so, which ones?
Thank you!
]]>Hi,
No push messages are sent because the data to be sent is no longer formatted correctly.
The error is in the file front_endpoints.php, line 116, “‘data’ => array()” can be removed, so it should look like this:
// prepare data
$data = array(
'to' => $tokens,
'sound' => 'default',
'title' => $notif->post_title,
'body' => $notif->post_content
);
Can you please update the plugin?
Best regards,
Denis