随笔- 557  评论- 28  文章- 0 

python3 钉钉群机器人 webhook

import requests
import json
url='https://oapi.dingtalk.com/robot/send?access_token=替换成你自己的toten'
program={
"msgtype": "text",
"text": {"content": "123!"},
}
headers={'Content-Type': 'application/json'}
f=requests.post(url,data=json.dumps(program),headers=headers)

官方文档:

https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.EUIOU6&treeId=257&articleId=105735&docType=1

创建机器人:

https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.Cl8b5a&treeId=257&articleId=105733&docType=1

posted on 2018-06-13 13:58  东大网管  阅读(...)  评论(...编辑  收藏