Skip to content

Instantly share code, notes, and snippets.

@lekro
Created April 15, 2018 02:39
Show Gist options
  • Save lekro/59c5f6d8c028ef27c5b42e6981816528 to your computer and use it in GitHub Desktop.
Save lekro/59c5f6d8c028ef27c5b42e6981816528 to your computer and use it in GitHub Desktop.
Send discord webhook using curl
#!/bin/sh
WEBHOOK_URL="put your url here"
PING="<@put your user id here>"
MESSAGE="$PING reminder"
JSON="{\"content\": \"$MESSAGE\"}"
curl -d "$JSON" -H "Content-Type: application/json" "$WEBHOOK_URL"
@K4mey
Copy link

K4mey commented Aug 23, 2020

or you can do it simply by running

curl -X POST --data '{"content": "REPLACE THIS WITH YOUR MESSSAGE"}' --header "Content-Type:application/json" "REPLACE THIS WITH A WEBHOOK URL"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment