web IM调用rest api获取群组列表失败,为什么?
//获取一个用户参与的所有群组
function getGroupForUser() {
$.ajax({
type: 'GET',
contentType: 'application/json',
headers: {
Authorization: 'Bearer ' + token
},
async: false,
url: 'https://a1.easemob.com/dhccjrb/hxchat/chatgroups/users/mabintao/joined_chatgroups',
success: function(data) {
alert(111);
mui.toast("获取群组列表成功");
return true;
},
error: function(data) {
console.log(JSON.stringify(data));
mui.toast("获取群组列表失败");
return false;
}
});
}
获取群组列表一直失败
[LOG] : {"readyState":4,"responseText":"{\"error\":\"illegal_argument\",\"timestamp\":1468849706849,\"duration\":0,\"exception\":\"java.lang.IllegalArgumentException\",\"error_description\":\"users is not a valid group id\"}","status":400,"statusText":"Bad Request"}
错误日志,这个用户我是有的,也有群组的,为什么获取不到群组列表,跪求各位大神!!!
function getGroupForUser() {
$.ajax({
type: 'GET',
contentType: 'application/json',
headers: {
Authorization: 'Bearer ' + token
},
async: false,
url: 'https://a1.easemob.com/dhccjrb/hxchat/chatgroups/users/mabintao/joined_chatgroups',
success: function(data) {
alert(111);
mui.toast("获取群组列表成功");
return true;
},
error: function(data) {
console.log(JSON.stringify(data));
mui.toast("获取群组列表失败");
return false;
}
});
}
获取群组列表一直失败
[LOG] : {"readyState":4,"responseText":"{\"error\":\"illegal_argument\",\"timestamp\":1468849706849,\"duration\":0,\"exception\":\"java.lang.IllegalArgumentException\",\"error_description\":\"users is not a valid group id\"}","status":400,"statusText":"Bad Request"}
错误日志,这个用户我是有的,也有群组的,为什么获取不到群组列表,跪求各位大神!!!
没有找到相关结果
已邀请:
1 个回复
M - 屌丝一枚