import requests
#text类型
content = {
"msgtype": "text",
"text": {
"content": "星期日"
},
"at": {
#@电话某人
"atMobiles": [
"156xxxx8827",
"189xxxx8325"
],
#是否@所有人
"isAtAll": False
}
}
#编码utf-8
headers = {"Content-Type": "application/json;charset=utf-8"}
#https
url = "https://oapi.dingtalk.com/robot/send?access_token=xxxxxx"
r = requests.post(url=url,headers=headers,json=content)
print(r.content)
Python request向钉钉机器人发送text
最新推荐文章于 2024-07-10 16:16:34 发布