钉钉发送通知

钉钉发送通知消息

官方文档 : https://open.dingtalk.com/document/robots/custom-robot-access

API Explorer调试 : https://open-dev.dingtalk.com/apiExplorer

方式一:webhook方式

https://open.dingtalk.com/document/robots/custom-robot-access

使用场景:发送消息到聊天群

前期准备:先创建一个测试群聊,然后在群里添加机器人即可,具体参数见官方文档

image-20240624164824498

# author : heart
# blog_url : https://www.cnblogs.com/ssrheart/
# time : 2024/1/11
import requests
urls = "https://oapi.dingtalk.com/robot/send?access_token="
data = {"msgtype": "text", "text": {"content": "大家好,周五周五敲锣打鼓"}}
res = requests.post(url=urls, json=data)
print(res)

image-20240624165004171

方式二:发送工作通知

https://blog.csdn.net/mouday/article/details/131341955

本文作者:ssrheart

本文链接:https://www.cnblogs.com/ssrheart/p/18265468

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   ssrheart  阅读(25)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起