A modern async client library for Rust, supports Slack Web / Events API/Socket Mode and Block Kit.
Find a file
Abdulla Abdurakhmanov 44ecce1101
Update README.md
2025-04-20 16:12:23 +02:00
.github/workflows chore(deps): update dependency windows to v2025 (#315) 2025-04-09 16:03:51 +02:00
docs chore(docs): Ver up 2025-02-23 13:50:57 +01:00
examples New Slack files upload API support (#276) 2024-06-02 23:26:42 +02:00
src fix: Fix emoji_list response deserialization (#314) 2025-03-19 13:44:32 +01:00
.gitignore vim dir to gitignore 2020-10-17 15:12:59 +02:00
Cargo.toml chore: Release slack-morphism version 2.10.1 2025-03-19 13:45:52 +01:00
CNAME gh-pages workflow fix 2020-08-22 18:40:30 +03:00
CONTRIBUTING.md Update CONTRIBUTING.md 2022-11-03 10:13:01 +01:00
COPYRIGHT.md Compliance updates 2022-10-15 12:02:04 +02:00
LICENSE Docs/Cargo update 2020-08-09 16:12:47 +03:00
README.md Update README.md 2025-04-20 16:12:23 +02:00
renovate.json Add renovate.json 2020-08-22 15:57:31 +00:00
SECURITY.md Ver up in README 2024-12-09 19:03:50 +01:00

Cargo tests and formatting security audit

Slack Morphism for Rust

Slack Morphism is a modern client library for Slack Web/Events API/Socket Mode and Block Kit.

Documentation

Please follow to the official website: https://slack-rust.abdolence.dev.

Examples

https://github.com/abdolence/slack-morphism-rust/tree/master/examples

The examples require to work the following environment variables (from your Slack bot profile in api.slack.com):

  • SLACK_TEST_TOKEN - for Slack client example
  • SLACK_TEST_APP_TOKEN - for Slack client with Socket Mode example
  • SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, SLACK_BOT_SCOPE, SLACK_REDIRECT_HOST - for OAuth routes for Events API example
  • SLACK_SIGNING_SECRET for all routes for Events API example

To run example use with environment variables:

# SLACK_... cargo run --example <client|events_api_server|axum_events_api_server|socket_mode> --all-features

Routes for this example are available on http://:8080:

  • /auth/install - to begin OAuth installation
  • /auth/callback - a callback endpoint for Slack OAuth profile config
  • /push - for Slack Push Events
  • /interaction - for Slack Interaction Events
  • /command - for Slack Command Events

Testing Events API with ngrok

For development/testing purposes you can use ngrok:

ngrok http 8080

and copy the URL it gives for you to the example parameters for SLACK_REDIRECT_HOST.

Example testing with ngrok:

SLACK_CLIENT_ID=<your-client-id> \
SLACK_CLIENT_SECRET=<your-client-secret> \
SLACK_BOT_SCOPE=app_mentions:read,incoming-webhook \
SLACK_REDIRECT_HOST=https://<your-ngrok-url>.ngrok.io \
SLACK_SIGNING_SECRET=<your-signing-secret> \
cargo run --example events_api_server  --all-features

Licence

Apache Software License (ASL)

Author

Abdulla Abdurakhmanov

with the great help of contributors, particularly:

  • Naoki Ikeguchi (@siketyan)
  • David Rousselie (@dax)

and many others