IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/list"); OapiAttendanceListRequest req = new OapiAttendanceListRequest(); req.WorkDateFrom = "2021-10-10 00:00:00"; req.WorkDateTo = "2021-10-17 00:00:00"; req.UserIdList = "011829613821850016"; req.Offset = 0L; req.Limit = 50L; OapiAttendanceListResponse rsp = client.Execute(req, access_token); Console.WriteLine(rsp.Body);
十六代码如上,在API Explorer 调试正常,复制到VS 里运行,提示req.UserIdList = "011829613821850016"不能把string 转为List ,
调整为List userIds = new List (); userIds.Add( "011829613821850016"); 代码调整为 IDingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/list"); OapiAttendanceListRequest req = new OapiAttendanceListRequest(); req.WorkDateFrom = "2021-10-10 00:00:00"; req.WorkDateTo = "2021-10-17 00:00:00"; req.UserIdList = userIds ; req.Offset = 0L; req.Limit = 50L; OapiAttendanceListResponse rsp = client.Execute(req, access_token); Console.WriteLine(rsp.Body);
报错:errmsg提示 {"errcode":40032,"errmsg":"不合法的UserID列表长度"}" 到底应该怎么写这个UserIdlist,
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。