Slack webhook tester
Paste an incoming webhook URL, write a message or Block Kit JSON, and send it. The request goes from your browser straight to Slack, and the answer is explained in plain words.
A webhook URL contains a secret. This tool sends it to hooks.slack.com and nowhere else: nothing you type reaches webhooks.cc, and nothing is stored.
What a browser can and cannot do here
Slack documents one way to send: a POST with the message as JSON and the header Content-type: application/json. A web page cannot make that request. Before a browser sends that header to another site it asks the site for permission (a CORS preflight), and hooks.slack.com does not give it.
So this tool sends the same JSON as a form field named payload. A form needs no preflight, and Slack's answers carry Access-Control-Allow-Origin: *, which lets the page read the status and the text and show them to you. Slack accepts the form, but its current documentation shows only the JSON request, so treat the curl command under each answer as the reference: if the tester gets invalid_payload for a message that looks right, run the curl command to rule out the difference.
If the browser cannot read the answer, because an extension, a firewall or a network filter got in the way, the page cannot know whether Slack received the message. It says so rather than guess, and shows the curl command for the request as Slack documents it, which prints Slack's answer in your terminal.
Two kinds of URL are not incoming webhooks and are refused before anything is sent: workflow webhooks (under /triggers/), which take the variables their workflow defines rather than a message, and GovSlack webhooks, which live on another host.
How a Slack incoming webhook works
An incoming webhook is a URL that posts messages into one Slack channel. You get one by creating a Slack app, turning on Incoming Webhooks and installing the app to a workspace; the channel is chosen at that moment, and the URL has the form https://hooks.slack.com/services/T.../B.../.... The URL contains a secret, and Slack searches for and revokes secrets it finds published.
The simplest message is {"text": "Hello, world."}. Text takes Slack's own formatting: *bold*, _italic_, and links written as <https://example.com|link text>. For layout beyond text, add a blocks array of Block Kit blocks, up to 50 in a message; the JSON tab above sends whatever you write. Keep text under 4,000 characters, as Slack advises; it cuts off messages longer than 40,000.
What Slack's answers mean
Slack answers 200 with the plain text ok when a message is posted. Anything else is a failure, named by a word in the body. Slack documents a status code for these:
| Answer | Status | Meaning |
|---|---|---|
| ok | 200 | The message was posted. |
| invalid_payload | 400 | The body could not be understood. Correct it before sending again. |
| user_not_found | 400 | The user named in the request does not exist. |
| action_prohibited | 403 | The workspace restricts this webhook from posting here. Trying again will not help. |
| channel_not_found | 404 | The channel the webhook posts to does not exist. |
| channel_is_archived | 410 | The channel was archived and accepts no more messages. |
| rollup_error | 500 | Something went wrong on Slack's side. |
Source: Changes to errors for incoming webhooks, Slack: Sending messages using incoming webhooks, Rate limits.
And these words, whose status the documentation does not give: no_service (the webhook is disabled, removed or invalid), no_team (the workspace is missing or invalid), team_disabled (the workspace is no longer active), no_active_hooks (the webhook is disabled), invalid_token (the secret is expired, invalid or missing), no_text (the payload has no text), posting_to_general_channel_denied and too_many_attachments (more than 100).
An incoming webhook takes about one message a second, with short bursts allowed. Past that Slack answers 429 Too Many Requests with a Retry-After header giving the seconds to wait.
The other direction: requests Slack sends to you
Events, slash commands and interactive components are requests from Slack to your app, each signed with your signing secret in the x-slack-signature header. To check one by hand, paste its body and headers into the webhook signature checker and pick Slack. To capture them as they arrive, see Slack webhooks.
Slack webhook questions
Paste the webhook URL into the tester above, write a message and press Send message. Slack answers 200 with the text "ok" when the message was posted to the channel the webhook was made for, and an error word such as invalid_payload or no_service when it was not. From a terminal the same test is one POST request with a JSON body and a Content-type: application/json header; the tester shows that curl command after each send.
Slack documents the request as JSON with a Content-type: application/json header. Before a browser sends that header to another site, it asks the site for permission with a preflight request, and hooks.slack.com does not grant it, so the browser never sends the message and reports a CORS error. The usual answer is to post from your server, which also keeps the webhook URL out of the page's source where any visitor could read it. A request with a form body needs no preflight, which is how this tester sends from your browser: the same JSON in a form field named payload, which Slack accepts although its current documentation shows only the JSON request.
Slack could not understand the body: the JSON is malformed, or its content does not match the content type it was sent with. It comes with a 400 status, and Slack says such a request should not be sent again without correcting it. Check that the body is one JSON object, that strings are in double quotes, and that line breaks inside strings are written as \n.
The incoming webhook is disabled, removed or invalid: the last parts of the URL match no webhook. That happens when the webhook or its app was removed from the workspace, or when Slack revoked the URL, which it does for secrets it finds published, for instance in a public repository. Create a new webhook and keep its URL out of code that others can read.
Not with a webhook made by a Slack app: Slack's documentation says you cannot override the default channel, the username or the icon, and the message goes to the channel chosen when the app was installed. Only legacy custom-integration webhooks took channel, username, icon_emoji and icon_url fields in the payload.
The URL contains a secret: anyone who has it can post to the channel. This page sends it to hooks.slack.com from your browser and nowhere else. There is no webhooks.cc server behind the tool, the page does not store what you type, and its analytics never record the fields. Your browser's network tab shows the one request, to hooks.slack.com.
That is the other direction: the Events API, slash commands and interactive components are requests Slack sends to a URL of yours, signed with your signing secret. Point the Request URL at a webhooks.cc endpoint to capture and inspect them, and check their x-slack-signature header with the webhook signature checker.
Testing what Slack sends to you
An incoming webhook posts into Slack. Events, slash commands and button presses come out of it, to a URL of yours. A webhooks.cc endpoint captures those requests with every header and the body, checks their signature, and forwards them to your machine while you build the handler.