python3发送slack通知

from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError

Token = "xoxb-xx-xx-xxx"

client = WebClient(token=Token)
channel_id = "xxx"

try:
    result = client.chat_postMessage(channel=channel_id, text="Hello!")
    print(result)

except SlackApiError as e:
    print(f"Error: {e}")

python3发送slack通知
https://blog.puresai.com/2023/10/04/497/
作者
puresai
许可协议