1、通行参数:Appsecret // Appkey //agentId //钉钉管理后台把公网IP加入白名单

 

//通行参数获取access_token
public static string GetToken()
{
            IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
            OapiGettokenRequest req = new OapiGettokenRequest();
            req.Appkey = Appkey;
            req.Appsecret = Appsecret;
            req.SetHttpMethod("GET");
            OapiGettokenResponse rsp = client.Execute(req);
            CGetToken token_json = JsonConvert.DeserializeObject<CGetToken>(rsp.Body);

            return token_json.access_token;
}

2、钉钉SDK及在线测试接口地址:https://open-dev.dingtalk.com/apiExplorer#/

image.png

3、钉钉接口调用流程:1.通过企业唯一通行参数获取access_token==》2.调用SDK里相应的接口方法获取json数据(可通过钉钉SDK及在线测试接口生成方法代码)==>4.序列化json数据存入数据库

4、借口SDK可到钉钉开放平台官网下载

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐