使用如下代码测试企业微信发送消息,
Dim ur As String = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token={0}"
Dim hc As new HttpClient(Cexp(ur,Functions.Execute("GetQYAccessToken")))
Dim jo As New JObject
jo("touser") = "003|001"
jo("msgtype") = "text"
jo("agentid") = 9
jo("text") = New JObject
jo("text")("content") = "您好,这是测试信息"
hc.Content = jo.ToString
jo = JObject.Parse(hc.GetData)
If jo("errcode") = "0" Then
MessageBox.show("消息发送成功!")
Else
MessageBox.show(jo.ToString)
End If
报错信息如下:
---------------------------
{
"errcode": 48002,
"errmsg": "api forbidden, hint: [1523256126_4_ff4e6f2149b88d9bbff79367af81d166], more info at https://open.work.weixin.qq.com/devtool/query?e=48002"
}
---------------------------
确定
---------------------------
已设置如CorpID 和Secret,请问这个报错是什么原因啊?