> ## Discord and Slack integrations

> Fetch the complete documentation index at: https://antithesis.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---

When you run tests, Antithesis will generate [triage reports](/docs/product/reports/) and email them to you. In addition, you may configure the test to post back results to a platform of your choice. This document covers how to configure this integration with **Discord** and **Slack**.

This is an example of an Antithesis webhook that kicks off a test and posts the results back to Discord (and also Github):

```bash
curl --fail -u '<USER>:<PASSWORD>' \
    -X POST https://<TENANT_NAME>.antithesis.com/api/v1/launch/<ENDPOINT> \
    -d '{"params": { "antithesis.description":"Nightly testing on main",
        "antithesis.integrations.discord.callback_url": "https://discord.com/api/webhooks/1234567890123456789/",
        "antithesis.integrations.discord.token": "<SECRET>",
        "antithesis.integrations.github.callback_url": "<URL>",
        "antithesis.integrations.github.token": "<SECRET>",
        "antithesis.images":"my_images_with_version_list" } }'
```

You can also add the callback URL and token for Discord or Slack to the Antithesis GitHub Action as additional parameters. Here's an example that posts back to Discord and Slack:

```yaml
additional_parameters: |-
  antithesis.integrations.discord.callback_url=<DISCORD_CALLBACK_URL>
  antithesis.integrations.discord.token=<DISCORD_SECRET>
  antithesis.integrations.slack.callback_url=<SLACK_CALLBACK_URL>
  antithesis.integrations.slack.token=<SLACK_SECRET>
```

See the [webhooks documentation](/docs/reference/webhook/overview/) for the syntax of webhook calls in general. The remainder of this document describes how to generate the following webhook parameters for Antithesis:

```
antithesis.integrations.<INTEGRATION_TYPE>.callback_url
antithesis.integrations.<INTEGRATION_TYPE>.token
```

where `<INTEGRATION_TYPE>` is `discord` or `slack`.

Importantly, you will need to go to your messaging app to generate these parameters, but then paste the generated parameters into your Antithesis webhook call.

## Discord

1. Begin in the server where you want your Antithesis results to be posted. Follow the directions in the [Discord webhook docs](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks), to create a new webhook. The steps below are correct as of September 2024.
2. Navigate to *Server Settings* and then to *Integrations*.
3. Create a new webhook.
4. Copy the webhook URL.

The URL will look something like:

```
https://discord.com/api/webhooks/000000000000000000/1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
```

Everything up to and including the final forward slash is the callback url. Everything after the final forward slash is the token. You should treat the token as a secret.

5. Paste the callback url and token into your webhook call as follows:

```
antithesis.integrations.discord.callback_url: https://discord.com/api/webhooks/000000000000000000/
antithesis.integrations.discord.token: 1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
```

When this integration is enabled, you will see results like the following:

## Slack

1. First, create a Slack app associated with the workspace where you want to post the results. The most current directions for doing this can be found at the [Slack webhook docs](https://api.slack.com/messaging/webhooks) documentation. The steps below are correct as of September 2024.
2. Click on dropdown arrow next to the name of your workspace. This will create a dropdown menu. Select *Tools & settings* and then *Manage apps.*
3. On the new screen, select *Build.* The *Create New App* button will pop up a menu. Select *From scratch.* Follow the prompts to create a new app.
4. On the new screen, select *Incoming Webhooks* in the Features section. Ensure that incoming webhooks are enabled and click the button labeled *Add New Webhook to Workspace*.
5. Pick the channel where you want your Antithesis results to be posted, and click *Allow*.
6. You should now see a section *Webhook URLs for Your Workspace*. Copy the webhook URL, which will look something like:

```
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
```

Everything up to and including the final forward slash is the callback url. Everything after the final forward slash is the token. You should treat the token as a secret.

7. Following the example at the top of this page, paste the callback url and token into your webhook call:

```
antithesis.integrations.slack.callback_url: https://hooks.slack.com/services/T00000000/B00000000/
antithesis.integrations.slack.token: XXXXXXXXXXXXXXXXXXXXXXXX
```

When this integration is enabled, you will see results like the following:
