Skip to content

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.

From your Slack app's settings: Incoming Webhooks, Copy.

23 / 4,000

Slack's own formatting works: *bold*, _italic_, `code`, <https://example.com|a link>.

Sent from your browser as a form field, because a web page cannot send Slack the JSON request directly. Why

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:

AnswerStatusMeaning
ok200The message was posted.
invalid_payload400The body could not be understood. Correct it before sending again.
user_not_found400The user named in the request does not exist.
action_prohibited403The workspace restricts this webhook from posting here. Trying again will not help.
channel_not_found404The channel the webhook posts to does not exist.
channel_is_archived410The channel was archived and accepts no more messages.
rollup_error500Something 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

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.

More free tools