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