注册

无法导出聊天记录

文档里的demo和我自己的代码调用都失败,返回错误相同,应该是rest api接口有问题,望修复http://www.easemob.com/docs/rest/chatmessage/#export-message

demo中例子:
curl -X GET -i -H "Authorization: Bearer YWMtxc6K0L1aEeKf9LWFzT9xEAAAAT7MNR_9OcNq-GwPsKwj_TruuxZfFSC2eIQ" "https://a1.easemob.com/easemob-demo/chatdemoui/chatmessages?limit=10&cursor=MTYxOTcyOTYyNDpnR2tBQVFNQWdHa0FCZ0ZHczFuSG93Q0**UFROW94S0lQZVBFZU9mTEQxQWVMdHEyQUNBZFFBUTlvd2pFUGVQRWVPaHFWa1l0ZjA2dEFB"返回404
HTTP/1.1 404 Not Found
Server: Tengine/2.0.3
Date: Tue, 19 May 2015 12:59:21 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *

{"error":"organization_application_not_found","timestamp":1432040361523,"duration":0,"exception":"org.apache.usergrid.rest.exceptions.OrganizationApplicationNotFoundException","error_description":"Could not find application for easemob-demo/chatdemoui from URI: easemob-demo/chatdemoui/chatmessages"}

另一个例子curl -X GET -i -H "Authorization: Bearer YWMtxc6K0L1aEeKf9LWFzT9xEAAAAT7MNR_9OcNq-GwPsKwj_TruuxZfFSC2eIQ" "https://a1.easemob.com/easemob-demo/chatdemoui/chatmessages?ql=select+*+where+timestamp>1403164734226"返回404
HTTP/1.1 404 Not Found
Server: Tengine/2.0.3
Date: Tue, 19 May 2015 13:00:51 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: *

{"error":"organization_application_not_found","timestamp":1432040451890,"duration":0,"exception":"org.apache.usergrid.rest.exceptions.OrganizationApplicationNotFoundException","error_description":"Could not find application for easemob-demo/chatdemoui from URI: easemob-demo/chatdemoui/chatmessages"}

已邀请:

lizg - ……

导出聊天记录的接口:https://a1.easemob.com/{org_name}/{app_name}/chatmessages,你看看org_name,app_name是不是你自己

lizg - ……

需要你自己的org_name,app_name,自己的token。
curl -X GET -i -H "Authorization: Bearer YWMtxc6K0L1aEeKf9LWFzT9xEAAAAT7MNR_9OcNq-GwPsKwj_TruuxZfFSC2eIQ" "https://a1.easemob.com/easemob-demo/chatdemoui/chatmessages?ql=select+*+where+timestamp>1403164734226" 这里面的YWMtxc6K0L1aEeKf9LWFzT9xEAAAAT7MNR_9OcNq-GwPsKwj_TruuxZfFSC2eIQ需要获取的。安装一个https://github.com/easemob/emchat-server-examples把里面的配置信息换成自己的应用,就可以得到这个token值。

要回复问题请先登录注册