Page 1 of 1

Sending file/image to Pushbullet

Posted: Tuesday 02 February 2016 14:15
by Kohen
I've been trying to send a picture with my message to pushbullet but cant figure it out.

Here is what i do:
When butten is pushed (doorbell) a snapshot will me made with this command:
/usr/bin/curl -s http://<IPSERVER>:<PORT>/camsnapshot.jpg?idx=2 > /volume1/web/Domoticz/images/doorbell/doorbell.png

Then it send a signal to my Pushbullet
curl -u <API KEY>: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "Doorbell", "body": "Someone is at the door!"}'

After that is completed I also want to upload the image just taken. In the documentation I need to use this API statement:
curl -u <API KEY>: -X POST https://api.pushbullet.com/v2/upload-request -d file_name=/volume1/web/Domoticz/images/doorbell/doorbell.png -d file_type=image/png

Taking the picture and sending me a notification is working but sending the picture .. not..
Can someone help me out?

Re: Sending file/image to Pushbullet

Posted: Tuesday 02 February 2016 16:13
by paulvha
uploading a file looks to be a multi-step process : It's actually a 3 step process. You send a file upload request to pushbullet, they respond with an amazon URL, you send the file to amazon, and then send a pushbullet notification to a device. ( from https://www.reddit.com/r/PushBullet/com ... ullet_api/). i tried to read the latest Pushbullet documentation to upload but it is "clear as mud"