zoukankan      html  css  js  c++  java
  • 钉钉SDK使用。

    (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);
           
    

      

    DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970,1,1));
    DateTime dtNow = DateTime.Parse("2019-7-31 ");
    TimeSpan toNow = dtNow.Subtract(dtStart);
    string timeStamp = toNow.Ticks.ToString();
    timeStamp = timeStamp.Substring(0,timeStamp.Length - 7);
    Response.Write(timeStamp);

  • 相关阅读:
    计算机网络——简单的端口扫描器
    Java课程设计——模拟行星运动
    H5 自定义数据属性
    实时获取网络状态
    Web 存储
    关于节流阀的理解
    DOM元素尺寸和位置
    H5选择符api
    HTML和XHTML的区别
    HTML的发展史
  • 原文地址:https://www.cnblogs.com/mqingqing123/p/11263887.html
Copyright © 2011-2022 走看看