Пример #1
0
        public static string Gerqi(string corip, string permanent_code)
        {
            string suite_access_token = IssuitResult(AppConfig.SuiteId, AppConfig.Corpsecret, AppConfig.SuiteTicket);
            string url = $"https://qyapi.weixin.qq.com/cgi-bin/service/get_corp_token?suite_access_token={suite_access_token}";

            log.AppenLog("得到企业AccessToken:" + url);
            string cansu = "{\"auth_corpid\": \"" + corip + "\",\"permanent_code\": \"" + permanent_code + "\"}";

            log.AppenLog("canshu:" + cansu);

            return(HttpPost.PostRequest(url, cansu, Encoding.UTF8));
        }
Пример #2
0
        /// <summary>
        /// 第三方应用得到用户详情信息
        /// </summary>
        /// ticketc成员票据
        /// <returns></returns>
        public static string GetUserDetail2(string ticket)
        {
            #region
            //            第三方使用user_ticket获取成员详情
            //            请求方式:POST(HTTPS)
            //请求地址:https://qyapi.weixin.qq.com/cgi-bin/service/getuserdetail3rd?access_token=SUITE_ACCESS_TOKEN

            //            请求包体:

            //{
            //                "user_ticket": "USER_TICKET"
            //}
            #endregion
            string url       = $"https://qyapi.weixin.qq.com/cgi-bin/service/getuserdetail3rd?access_token={AppConfig.suite_access_token}";
            string canshu    = "{\"user_ticket\": \"" + ticket + "\"}";
            string strResult = HttpPost.PostRequest(url, canshu, Encoding.UTF8);
            log.AppenLog("成员全部详情信息包括头像:" + strResult);
            return(strResult);
        }