Last active
November 2, 2021 18:47
-
-
Save candale/f5464f1c8ae34888bba09bfc556ef943 to your computer and use it in GitHub Desktop.
Pushbullet Simple Notificaion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get the API token by going here: https://www.pushbullet.com/#settings/account | |
API_TOKEN='' | |
# to create a new channel, go to https://www.pushbullet.com/my-channel | |
# use the chosen tag for the var below | |
# for existing channel, you can get the tag from here: https://www.pushbullet.com/#settings/channels | |
CHANNEL_TAG='' | |
send_notif() { | |
curl \ | |
--header "Access-Token: $API_TOKEN" \ | |
--header 'Content-Type: application/json' \ | |
--data-binary '{"body": "body here", "title": "title here", "type": "note", "channel_tag": "'"$CHANNEL_TAG"'"}' \ | |
--request POST \ | |
https://api.pushbullet.com/v2/pushes | |
} | |
send_notif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment