调用发送应用消息接口返回错误 ok. Warning: wrong json format

企业微信 文章 2021-01-27 16:41 0 74 全屏看文

调用发送应用消息接口返回错误 ok. Warning: wrong json formatCalling the sending application message interface returns an error ok. Warning: wrong json format

调用发送应用消息接口返回错误 ok. Warning: wrong json format
今天下午调用发送应用消息接口返回错误 ok. Warning: wrong json format,无法接收到消息。 同样的接口和代码逻辑,中午1206分钟还能正常收到,麻烦帮忙看下是什么问题?Array(    [toparty] => 4    [msgtype] => text    [agentid] => 1000003    [text] => Array        (            [content] => 【业务监控报警】测试数据回传(测试消息,忽略)        )    [safe] => 0){"errcode":0,"errmsg":"ok. Warning: wrong json format. ","invaliduser":""}

Calling the sending application message interface this afternoon returned the error OK. Warning: wrong JSON format, unable to receive the message. The same interface and code logic can be received at 12:06 noon. Please help me to see what the problem is? Array ([toParty] = > 4 [msgtype] = > text [AgentID] = > 1000003 [text] = > array ([content] = > [service monitoring alarm] test data return (test message, ignored)) [safe] = > 0) {"errCode": 0, "errmsg": "OK. Warning: wrong JSON format.", "invaliduser": "}

回答:

企业微信运营专员-千夜:

你好,部门id没有加双引号,这里要求应该是字符串形式

lyx:

你这个是数组,发送应用消息要求发送json数据。

另我们这边不少开发和产品就自己组建了群,三百多号同行。有做SaaS的有做定制的,流程不明白,互帮互助,文档不清楚我们就自己讨论了....

加群可以加我微信 li570467731,备注“企业微信“,可加开发及产品同行群。

 


Yeo:
发送消息内容:{"toparty":4,"msgtype":"text","agentid":1000003,"text":{"content":"【业务监控报警】测试数据回传(测试消息,忽略)"},"safe":0}返回内容:{"errcode":0,"errmsg":"ok. Warning: wrong json format. ","invaliduser":""}发送时间:20211261526分左右


-EOF-