Sending a Push via Boxcar
Sending a Push Notification can be done quite easily from the Boxcar console, but this isn't useful when we want these pushes to be sent automatically. Thankfully, Boxcar utilizes an HTTP API, which means we can generate a push from anything that can generate HTTP requests.
You'll need to obtain the Publisher Access Key and Publisher Secret Key to send a Push Notification programmatically. To do this, follow these steps:
On the Dashboard, click on the gear icon for our Boxcar project.
Click on Publishers.
Click on Tasker API and you should be presented with a screen that contains the necessary keys as well as some example codes you can use. We have modified the Python example and placed it in
/ch7/sendPush
.
Sending a push boils down to this process:
A push object is created, as follows:
push = { "taskId": "21" , // custom data "f": "0", // indicates if has rich content 0=no "i": "17327", // id for push "badge": "auto", // badge (iOS) "auto" or a number...