Skip to content

Instantly share code, notes, and snippets.

@candale
Last active November 2, 2021 18:47
Show Gist options
  • Save candale/f5464f1c8ae34888bba09bfc556ef943 to your computer and use it in GitHub Desktop.
Save candale/f5464f1c8ae34888bba09bfc556ef943 to your computer and use it in GitHub Desktop.
Pushbullet Simple Notificaion
#!/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