Pushover API

Example scripts and tips (replaces Old Scripts & Tips archive)

Moderators: Dorian (MJT support), JRL, Phil Pendlebury, Rain

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 313
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Pushover API

Post by Grovkillen » Fri Jan 18, 2019 7:23 am

Code: Select all

//token needs to be generated by adding a application to your user
//user key is automatically generated to your user, but if you want to push info to multiple
//users you need to make a group key
Let>pushover_token=YOUR_APPLICATION_TOKEN
Let>pushover_user_key=YOUR_USER_KEY

Let>pushover_api_url=https://api.pushover.net/1/messages.json

Let>pushover_title=title text
Let>pushover_message=test message body
Let>pushover_device=your_device_name
Let>pushover_priority=1

//You can add all keys found here: https://pushover.net/api
Let>DISABLE_COMPLEX_EXPRESSIONS=1
Let>pushover_json={ "token":"%pushover_token%"%COMMA%
Concat>pushover_json,"user":"%pushover_user_key%"%COMMA%
Concat>pushover_json,"priority":"%pushover_priority%"%COMMA%
Concat>pushover_json,"device":"%pushover_device%"%COMMA%
Concat>pushover_json,"title":"%pushover_title%"%COMMA%
Concat>pushover_json,"message":"%pushover_message%" }
Let>DISABLE_COMPLEX_EXPRESSIONS=0

Let>HTTP_TIMEOUT=5
Let>HTTP_REDIRECTS=1
Let>HTTP_SSL=1
Let>HTTP_POSTJSON=1
HTTPRequest>pushover_api_url,,POST,pushover_json,api_response
//MDL>api_response
Let>ME=%Script%

Running: MS14.5.4

Post Reply