****— category: Reference type: ecosystem ecosystem: http4k Connect title: Slack description: Feature overview of the http4k Connect Slack modules

dependencies {
    
    implementation(platform("org.http4k:http4k-bom:6.12.0.0"))

    implementation("org.http4k:http4k-connect-slack")
}

The Slack connector provides the following Actions:

  • Send Channel Message

Example usage

val message = SlackMessage("message", channel = ChannelId.of("channel"))
val slack = Slack.Http({ SlackToken.of("my slack token") })
slack.chatPostMessage(message)

val webhooks = SlackWebhook.Http(Uri.of("https://hooks.slack.com/services/some/webhook/path"))
slackWebhooks.webhookPostMessage(message)

Default Fake port: 23660

To start:

FakeSlack().start()
```****