Python对接钉钉接口 dingtalk-sdk
作者:互联网
网上关于Python调用钉钉SDK的例子还是比较少的,特此整理。记录自己的点滴进步。
安装钉钉SDK
pip3 install dingtalk-sdk
pip3 install dingtalk-sdk[cryptography]
from dingtalk import SecretClient, AppKeyClient
app_key = "你的app_key"
app_secret = "你的app_secret"
corp_id = "你的agentid(crop_id)"
# 新 access_token 获取方式
client = AppKeyClient(corp_id=corp_id, app_key=app_key, app_secret=app_secret)
具体调用参考钉钉官方文档
https://dingtalk-sdk.readthedocs.io/zh_CN/latest/client/index.html
对返回值的参数钉钉开放平台有具体说明
https://ding-doc.dingtalk.com/doc?spm=a2115p.8777639.0.0.577f4260yicX98#/serverapi2/ul33mm
在这里感谢大神的整理
https://blog.csdn.net/weixin_42336574/article/details/95485622?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2%7Eall%7Esobaiduend%7Edefault-2-95485622.nonecase&utm_term=python3%E4%BD%BF%E7%94%A8dingtalk&spm=1000.2123.3001.4430
标签:dingtalk,Python,app,secret,key,id,sdk 来源: https://blog.csdn.net/qq_29537269/article/details/109924808