Trying to send a attachment with pushover without success..
Sending normal messages with topics works fine.
Does anyone have any ideas or a working script?
Using this example to send messages and it works well to send notifications to my Sony tv..
But how do I include a image in this php code?
Code: Select all
<?php
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => "APP_TOKEN",
"user" => "USER_KEY",
"message" => "hello world",
),
CURLOPT_SAFE_UPLOAD => true,
CURLOPT_RETURNTRANSFER => true,
));
curl_exec($ch);
curl_close($ch);
?>
Code from https://updates.pushover.net/post/17004 ... ushover-30
Code: Select all
If you use curl to send notifications, it’s as easy as:
curl -s \
--form-string "token=APP_TOKEN" \
--form-string "user=USER_KEY" \
--form-string "message=here is an image attachment" \
-F "attachment=@/path/to/your/image.jpg" \
https://api.pushover.net/1/messages.json
Skickat från min SM-N950F via Tapatalk