How to Create, Connect and Use a Discord Webhook
A Discord incoming webhook is the shortest path from a tool or script into one channel. It can set a display name and avatar and post rich Components V2 layouts, but its URL is also a credential. Set it up once, connect the service that needs it, handle the URL like a password, and test with a message you can recognize.
What is a Discord webhook?
A Discord webhook is a URL that lets another app post messages into one channel — no bot account, no login and no code running inside Discord. Anything that can send an HTTP request can use it: a GitHub repository announcing commits, a monitoring service raising an alert, a form sending each response, a store posting new orders, or a script sending a daily report.
The trade-off is that a webhook only talks. It posts, edits and deletes its own messages, and that is all: it cannot read the channel, react, reply or respond to a button click. When you need any of those, you need a bot or an application — the table further down lists exactly where the line falls.
Before you start
You need access to the target server and the Manage Webhooks permission in the channel. If the Webhooks control is missing or disabled, ask a server administrator to create it or adjust your role. Choose the destination channel carefully: an incoming webhook is tied to a channel until an authorized manager edits it.
Create the incoming webhook
Discord's labels can move between clients, but the canonical control remains under the server's Integrations and Webhooks settings. On a managed server, role and channel overrides can both affect whether you can see or manage it.
- Open the server's settings, choose Integrations, then open Webhooks.
- Choose New Webhook, give it a recognizable name and select the destination channel.
- Copy the webhook URL. Do not paste it into chat, tickets, screenshots, source control or analytics.
- Keep the settings page open until your test succeeds, so you can rotate or delete the webhook immediately if needed.
Create a webhook on mobile
The mobile app exposes the same control. Open the server, tap its name to reach Server Settings, choose Integrations, then Webhooks, and create the webhook exactly as on desktop. Copying the URL on a phone is the risky step: the clipboard is shared with every app, so paste it straight into the tool that needs it and clear it afterwards rather than leaving it in a notes app or a chat draft.
A channel-level shortcut also exists on desktop: open the channel's settings, choose Integrations and create the webhook there. It is the same object, already pointed at that channel.
What the webhook URL contains
A webhook URL has two parts after the fixed prefix: a numeric webhook id and a long token. The id is public information — it appears in API responses and identifies the webhook. The token is the secret: anyone who has the full URL can post as that webhook without being a member of the server, edit or delete the messages it sent, and change its name and avatar. There is no separate password, which is why the URL is treated as a credential throughout these guides.
Discord does not offer a regenerate-token button. If the URL has leaked or you simply want to rotate it, delete the webhook and create a new one; messages it already posted stay in the channel and can still be restored from their message link by the new owner of that channel's webhooks.
https://discord.com/api/webhooks/<webhook id>/<webhook token>
public secretConnect an app or service to the webhook
Connecting a service to Discord almost always means giving it this URL. Look for a Discord, webhook or notification setting in the other product, paste the URL, and send its test notification if it has one. Three variations cover nearly everything else:
- GitHub: in the repository's Settings → Webhooks, add a webhook whose payload URL is the Discord URL with /github on the end, and set the content type to application/json — the form-encoded default is a common cause of a 400.
- Services that only speak Slack's webhook format can use Discord's Slack-compatible endpoint: the same URL with /slack on the end.
- Automation platforms, form builders and your own scripts post JSON straight to the plain URL. The cURL, Python and JavaScript guides show a complete, working request in each.
| Sender | URL to give it | Body it sends |
|---|---|---|
| Your own script or automation tool | https://discord.com/api/webhooks/ID/TOKEN | Discord's JSON: content, embeds or Components V2 |
| GitHub | https://discord.com/api/webhooks/ID/TOKEN/github | GitHub's event JSON |
| A Slack-style integration | https://discord.com/api/webhooks/ID/TOKEN/slack | Slack's webhook JSON |
What a webhook can and cannot do
That last row is the one that surprises most people. A webhook is a one-way door into one channel: perfect for announcements, rules, status posts and anything else that does not need a response. When members must click something and have a bot react, the destination has to be a webhook owned by an application that receives the click — DWEEB's plugins and the interaction features exist for exactly that case.
| A webhook can | A webhook cannot |
|---|---|
| Post to its channel with any display name and avatar, including Components V2 layouts, embeds and file attachments | Read messages, react, or reply to anything in the channel |
| Edit and delete the messages it posted, using the message id and its own token | Delete or edit messages posted by people or other webhooks |
| Post into an existing thread, or create a forum or media post, with the thread parameters | Send direct messages, assign roles, or run slash commands |
| Carry link buttons that open a URL | Own custom-ID buttons or select menus unless an application created it — those need an interaction handler |
Build and send the first message
Nothing posts merely because a URL was pasted. DWEEB shows a confirmation before the request. For a normal person-created webhook, use static components and link buttons. Custom-ID buttons and select menus need an app-owned webhook because Discord must deliver their interactions to an application.
- Open DWEEB and choose a blank message or a template.
- Add Text Displays, Containers, Sections, buttons and media while watching the live Discord-style preview.
- Open Send, paste the webhook URL or connect the server and choose a channel.
- Review the resolved destination and validation warnings, then confirm the post.
- Keep the resulting message link if you intend to restore and edit that post later.
A small curl test
For a plain connectivity test, replace the placeholder with the real URL only in your local terminal. Avoid shell history on shared machines and never commit the command with a live token.
curl -H "Content-Type: application/json" \
-d '{"content":"Webhook connected successfully."}' \
"https://discord.com/api/webhooks/WEBHOOK_ID/WEBHOOK_TOKEN"Common failures
Keep the HTTP status, Discord's numeric error code and the field named in the response together. The webhook troubleshooting guide maps those details to a fix; a 404 while restoring a message needs a different check from a 404 while sending a new one.
A forum or media channel also needs a post destination. Follow the forum and thread workflow to create a titled post or send into an existing thread.
| Symptom | Likely cause | What to check |
|---|---|---|
| 401 or invalid webhook token | The URL is incomplete, rotated or deleted | Copy it again from Integrations; do not reconstruct it |
| 403 or missing access | Permissions or a thread target block the request | Manage Webhooks, channel access and thread state |
| 400 invalid form body | The payload breaks a field, component or nesting limit | Use DWEEB's issue list before send |
| Interactive component rejected | A person-created webhook cannot own interactions | Use a guided app-owned destination or make the control a link |
What to do if the URL leaks
Delete or rotate the webhook immediately; removing a leaked post is not enough because the credential remains valid. Search repositories, build logs and team chat for copies, then create a fresh webhook and update only the systems that genuinely need it. Treat unexpected messages from a webhook as a credential incident.
Frequently asked questions
Where do I find my Discord webhook URL?
Open Server Settings, choose Integrations, then Webhooks, select the webhook and press Copy Webhook URL. The same list is reachable from a channel's own settings under Integrations. If Integrations is missing, your role does not have Manage Webhooks.
Do I need a bot to use a Discord webhook?
No. The URL alone is enough to post, edit and delete the webhook's own messages. A bot or application is only needed to read messages, reply, react, or respond when someone clicks a button or picks from a menu.
How many webhooks can a Discord server have?
Discord allows 15 webhooks per channel and 1,000 per server. Past either cap, creating another fails with “Maximum number of webhooks reached”, so delete webhooks you no longer use.
Why can't I see the Webhooks option in Integrations?
Creating and managing webhooks needs the Manage Webhooks permission in that channel, or Administrator. Ask a server admin to grant it to your role for the channel, or to create the webhook for you.
Can a Discord webhook read messages or send DMs?
No. A webhook is one-way into a single channel: it can post and manage its own messages there, but it cannot read the channel, message users directly, assign roles or run commands.
How do I test a Discord webhook?
Send one short, recognizable message — with the curl command above, or by pasting the URL into DWEEB and sending a draft after checking the preview — and confirm it appears in the right channel. Then delete the test post or keep it as your first real message.
Put the guide into practice
Open the exact workflow in DWEEB. Nothing posts until you review and confirm it.
Build your first webhook message →