Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuthApi.GetAgent C# (CSharp) Method

GetAgent() public static method

获取企业号应用
public static GetAgent ( string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT ) : GetAgentResult
suiteAccessToken string
suiteId string 应用套件id
authCorpId string 授权方corpid
permanentCode string 永久授权码,从get_permanent_code接口中获取
agentId string 授权方应用id
timeOut int 代理请求超时时间(毫秒)
return Senparc.Weixin.Work.AdvancedAPIs.ThirdPartyAuth.GetAgentResult
        public static GetAgentResult GetAgent(string suiteAccessToken, string suiteId, string authCorpId, string permanentCode, string agentId, int timeOut = Config.TIME_OUT)
        {
            var url = string.Format("https://qyapi.weixin.qq.com/cgi-bin/service/get_agent?suite_access_token={0}", suiteAccessToken.AsUrlData());

            var data = new
            {
                suite_id = suiteId,
                auth_corpid = authCorpId,
                permanent_code = permanentCode,
                agentid = agentId
            };

            return CommonJsonSend.Send<GetAgentResult>(null, url, data, CommonJsonSendType.POST, timeOut);
        }