钉钉发送通知

钉钉发送通知消息

官方文档 : 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

posted @ 2024-06-24 16:52  ALPACINO6  阅读(32)  评论(0)    收藏  举报