调企业会话的接口,php的方式,用的是下载的包
$c
=
new
DingTalkClient;
$req
=
new
CorpMessageCorpconversationAsyncsendRequest;
$req
->setMsgtype(
"oa"
);
$req
->setAgentId(
"111111"
);
$req
->setUseridList(
"22222222"
);
$req
->setDeptIdList(
""
);
$req
->setToAllUser(
"false"
);
$req
->setMsgcontent(
'{"message_url": "http://dingtalk.com","head": {"bgcolor": "FFBBBBBB","text": "头部标题"},"body": {"title": "正文标题","form": [{"key": "姓名:","value": "张三"},{"key": "爱好:","value": "打球、听音乐"}],"rich": {"num": "15.6","unit": "元"},"content": "大段文本大段文本大段文本大段文本大段文本大段文本大段文本大段文本大段文本大段文本大段文本大段文本","image": "@lADOADmaWMzazQKA","file_count": "3","author": "李四 "}}'
);
$resp
=
$c
->execute(
$req
,
"33333"
);
代码这样写有问题吗?
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。