webwxbatchgetcontact 返回全部群信息
这个 webwxgetcontact 只是批量获取 群组或者好友的详细信息
Post 请求:
https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?
type=ex
&r=1454120072706
&lang=zh_CN
&pass_ticket=J8sXia58QYVfuYd8WovzMFRVRrzRhDhLWfuz%252BWAcA66ruGDKPrEIG5RpETXtbapz
参数:
lang zh_CN
pass_ticket J8sXia58QYVfuYd8WovzMFRVRrzRhDhLWfuz%2BWAcA66ruGDKPrEIG5RpETXtbapz
r 1454120072706
type ex
JSON:
BaseRequest Object { Uin=1284510822, Sid="9dOfMj2jJ1i3dip6", Skey="@crypt_597aeefd_59e7e8522645e6ee09e9a81e67891e5c", 更多...}
Count 50
List Object { UserName="@@64bef8cb87eef0527f0178...9f457cba45f0ce09b390bb9", EncryChatRoomId=""}, Object { UserName="@@06d5f4c78e00d16e16b4a9...9c9133cea7a61ca15eb7b35", EncryChatRoomId=""}, Object { UserName="@@730e33b4ba31c677a7ac40...327bf498717daa6b9683d5b", EncryChatRoomId=""}, 47 更多...]
0 Object { UserName="@@64bef8cb87eef0527f0178...9f457cba45f0ce09b390bb9", EncryChatRoomId=""}
EncryChatRoomId
""
UserName
"@@64bef8cb87eef0527f0178945173438b03c0cf6fa9f457cba45f0ce09b390bb9"
1
Object { UserName="@@06d5f4c78e00d16e16b4a9...9c9133cea7a61ca15eb7b35", EncryChatRoomId=""}
EncryChatRoomId
""
UserName
"@@06d5f4c78e00d16e16b4a9bbf01b795ff4d81903c9c9133cea7a61ca15eb7b35"
返回内容:
群信息,有详细信息和好友信息
perl :
$login_url="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=$now&lang=zh_CN&pass_ticket=$pass_ticket";
my $post = {
BaseRequest => {
Uin => $wxuin,
Sid => $wxsid,
Skey => $Skey,
DeviceID => $DeviceID,
},
Count => $chat_num,
List => [map { {UserName=>$_,ChatRoomId=>""} } @chatroom_id ],
};
use JSON qw(encode_json);
$json_string = encode_json($post);
my $req = HTTP::Request->new('POST' => $login_url,[ 'lang'=>'zh_CN', 'pass_ticket'=>"$pass_ticket",'r'=>"$now",'type'=>'ex']);