Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To get a Slack channel webhook URL, open your Slack app’s settings, enable Incoming Webhooks, add a webhook to your workspace, choose the destination channel, and authorize it. Slack then lists the generated URL under Webhook URLs for Your Workspace in the app settings. Treat that URL as a password: anyone who obtains it may be able to post to its configured channel.

Get a webhook URL from Slack app settings

  1. Open the Slack app management dashboard and create an app or select an app you already own.

  2. In the app settings, open Incoming Webhooks and turn on Activate Incoming Webhooks.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  3. Select Add New Webhook to Workspace to start the installation and authorization flow.

  4. Choose the destination channel and select Authorize. For a private channel, you must already be a member before you can authorize it.

  5. Return to the app settings and copy the generated URL from Webhook URLs for Your Workspace. Slack’s documentation shows URLs in the hooks.slack.com/services/... format; an example URL is not a usable credential.

Get webhook details through OAuth

If you are building an app that asks a workspace to install it, request the incoming-webhook scope in the OAuth permissions. Slack’s scope documentation says this enables incoming webhooks and presents a channel picker during installation. After exchanging the OAuth verification code, read the incoming_webhook object in the response and use its url field. The object also includes the selected channel, channel_id, and configuration_url.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Send a test message

Make an HTTP POST request to the generated URL with a JSON content type and a JSON body. For example:

POST <your-generated-webhook-url>
Content-type: application/json

{"text":"Hello, world."}

A successful request posts to the channel selected when the webhook was authorized. Incoming webhooks also support richer block formatting. See Slack’s incoming webhooks guide for request details and formatting options.

Know what the webhook can and cannot do

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Protect or replace an exposed URL

Slack warns: “Your webhook URL contains a secret. Don’t share it online, including via public version control repositories.” Slack says it actively searches for and revokes leaked secrets. Keep the URL out of public repositories, posts, screenshots, and logs. If it is exposed, treat it as compromised: remove or regenerate it through Slack’s app or workspace configuration, then update the system that sends messages to use the replacement.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.