1
votes

I want to send a Webhook Using The CMD Command line Curl However the command i made:

curl -X POST --data '{"content": "Posted Via Command line"}' --header "Content-Type:application/json" discord-webhook-link

Returns This Message

curl: (3) [globbing] unmatched close brace/bracket in column 24

{"message": "400: Bad Request", "code": 0}

Is there a way I can send a Discord Webhook message via the command Line?

1
It seems your request body (provided by --data flag) is in wrong format. Check what discord webhook wants.Shudipta Sharma
The Discord Developer docs are not very clear I do Know i need Json pramarters but code examples i found online Do not workboofhead
I have no idea, sorry.Shudipta Sharma

1 Answers

3
votes

the following syntax is working for me, maybe give it a try.

curl -i -H "Accept: application/json" -H "Content-Type:application/json" -X POST --data "{\"content\": \"Posted Via Command line\"}" discord-webhook-link