Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Send messages to Discord using curl

This blog post shows how to create a token:

Enable developer mode:

  1. User Settings
  2. Advanced
  3. Enable Developer Mode

Get the channel id:

  1. Right click on a channel
  2. Select "copy id"

Make a request:

curl -H "Authorization: Bot $DISCORD_TOKEN" \
     -H "Content-Type: application/json" \
     -XPOST "$CHANNEL_ID/messages" -d '{"content": "hi"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment