使用服务端接口为 /messge/send_to_conversation
如题所示,在 钉钉中打开微应用,通过服务端发送普通消息给用户,返回“找不到该用户”;
但是,用浏览器打开该页面,可以正常发送消息,这个是怎么回事?,以下分别是钉钉及浏览器发送消息的Headers
钉钉Headers:
Request URL:http://218.75.164.37:32125/page/sendmessage
浏览器Headers
Request Method:POST
Status Code:200
Remote Address:218.75.164.37:32125
Response Headers
view source
Content-Length:220
Date:Fri, 31 Mar 2017 00:55:46 GMT
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,en-US;q=0.8
Connection:keep-alive
Content-Length:867
Content-Type:application/x-www-form-urlencoded
Cookie:JSESSIONID=31C611168F619E601B74B973F2F61CE3
Host:218.75.164.37:32125
Origin:http://218.75.164.37:32125
Referer:http://218.75.164.37:32125/page/index.jsp?userid=085467122421188443&tousers=092307014921188443;&count=1
User-Agent:Mozilla/5.0 (Linux; Android 7.0; KNT-UL10 Build/HUAWEIKNT-UL10; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/55.0.2883.91 Mobile Safari/537.36 AliApp(DingTalk/3.4.6) com.alibaba.android.rimet/0 Channel/702553 language/zh-CN
X-DevTools-Emulate-Network-Conditions-Client-Id:ee4c154a-50ac-4089-9778-b3ef12980b92
X-Requested-With:XMLHttpRequest
Form Data
view source
view URL encoded
author[active]:true
author[avatar]:http://static.dingtalk.com/media/lADOrR3kxc0C6M0C6A_744_744.jpg
author[department][]:2687909
author[dingId]:$:LWCP_v1:$2jpWXQ60s3gbGUAXbT1k3w==
author[email]:
author[isAdmin]:true
author[isBoss]:false
author[isHide]:false
author[isLeaderInDepts]:{2687909:false}
author[jobnumber]:8824
author[mobile]:17807302362
author[name]:刘移州
author[orderInDepts]:{2687909:69547231771160824}
author[position]:
author[remark]:
author[tel]:
author[userid]:085467122421188443
author[workPlace]:
agentId:23186977
toUsers:092307014921188443|
content:小女生矿务局这不是
type:oa
image:
url:http://218.75.164.37:32125
title:this is a nomal message
Request URL:http://218.75.164.37:32125/page/sendmessage
Request Method:POST
Status Code:200
Remote Address:218.75.164.37:32125
Referrer Policy:no-referrer-when-downgrade
Response Headers
view source
Content-Length:57
Date:Fri, 31 Mar 2017 00:56:47 GMT
Request Headers
view source
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:zh-CN,zh;q=0.8
Connection:keep-alive
Content-Length:176
Content-Type:application/x-www-form-urlencoded
Cookie:JSESSIONID=136ADA4F7B817107E820C331602C967D
Host:218.75.164.37:32125
Origin:http://218.75.164.37:32125
Referer:http://218.75.164.37:32125/page/index.jsp?userid=085467122421188443&tousers=092307014921188443;&count=1
User-Agent:Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.110 Mobile Safari/537.36
X-Requested-With:XMLHttpRequest
Form Data
view source
view URL encoded
author:085467122421188443
agentId:23186977
toUsers:092307014921188443|
content:hbw4esdcx
type:text
image:
url:http://218.75.164.37:32125
title:this is a nomal message
以下是返回的提示信息截图
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。