以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]关于企业微信接口使用 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169831) |
||||||||||||||||||||
-- 作者:zto001 -- 发布时间:2021/7/2 13:36:00 -- [求助]关于企业微信接口使用 我要用获取打卡记录的接口。想问问怎么写? Dim 开始,结束 As Date 开始=Date.Today.AddDays(-1) 结束=Date.Today Dim 加密接口,开始时间戳,结束时间戳 As String Dim st As New Date(1970,1,1,8,0,0) 开始时间戳=CInt((开始- st).TotalSeconds()) 结束时间戳=CInt((结束- st).TotalSeconds()) 加密接口="4AQ29OlA-d7U6Vo73w1hGDTqU1knS8Kpr24sRmbxLxk0TWmOXgnVWHcxhJaIGGvXkvDkif3gMzciqPtIOHZrrItbpneaai0XbbOF-26I-eN5D7Cld7qox4IBEiyHwtDesbmewCktQCvH1ISx_oFChJH0Pv2_B0Z9_x0wVr0PZiEZ914c9p1OvtiL6p251sgQwQ" Dim hc As new HttpClient("https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckin_daydata?access_token=" & 加密接口 ) hc.C hc.FormData.Add("access_token",加密接口) \'hc.FormData.Add("opencheckindatatype",1) hc.FormData.Add("starttime",开始时间戳) hc.FormData.Add("endtime",结束时间戳) hc.FormData.Add("useridlist", "[\'YY001\',\'YY002\',\'YY003\',\'YY004\',\'YY005\',\'YY006\',\'YY007\',\'YY008\',\'YY009\',\'YY010\',\'YY011\',\'YY12\']" ) Output.Show(hc.GetData) 请求地址: https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckin_daydata?access_token=ACCESS_TOKEN 请求示例
参数说明:
我应该是哪里写错了,返回错误,怎么写?
|
||||||||||||||||||||
-- 作者:有点蓝 -- 发布时间:2021/7/2 13:44:00 -- Dim hc As new HttpClient("https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckin_daydata?access_token=" & 加密接口 ) hc.ContentType = "application/json" Dim jo As New JObject jo("endtime") = "1599062400"jo("starttime") = "1599062400" Dim ja As New Jarray jo("useridlist") = ja ja.Add("YY001") ja.Add("YY002") hc.Content = jo.tostring Output.Show(hc.GetData)
|