2020
09-27
09-27
如何基于python对接钉钉并获取access_token
1.首先注册应用,获取appkey、appsecretapi_url="https://oapi.dingtalk.com/gettoken?appkey=%s&appsecret=%s"%(appkey,appsecret)defget_token():#try:res=requests.get(api_url)ifres.status_code==200:str_res=res.texttoken=(json.loads(str_res)).get('access_token')returntoken2.此时拿到的token就是access_token,可以用它来发送请求了defdepartList():#所有部门信息url='h...
继续阅读 >