Skip to main content

post_message

Function post_message 

Source
pub async fn post_message(
    http: &Client,
    bot_token: &str,
    channel_id: &str,
    msg: &OutboundMsg,
) -> Result<(), SlackApiError>
Expand description

POST chat.postMessage — Authorization: Bearer {bot_token}. MUST check body.ok, not just HTTP status: Slack’s REST responses are HTTP 200 even on many logical failures (e.g. channel_not_found, not_in_channel) — spec §2.4.