(1)到 https://open-doc.dingtalk.com/microapp/faquestions/vzbp02 下载SDK
(2)引入
using DingTalk.Api; using DingTalk.Api.Request; using DingTalk.Api.Response;
(3)获取AccessToken
string appkey = "dingt1s1h82ctf6wyy11"; string appSec = "NKfjZJrNlZUIhcJPVURipXi9V6cduQcc5T5hBEJu5pyrWi7yCOVMGILtq6ELqU11"; IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken"); OapiGettokenRequest req=new OapiGettokenRequest(); req.Appsecret = appSec; req.Appkey = appkey; req.SetHttpMethod("GET"); OapiGettokenResponse res = null; res = client.Execute(req); Response.Write(res.AccessToken);