文/涅阳三水

[文档]Web微信协议

统计 1

1.登录

365/82

1.1 获取uuid(get)

前情回看:

请求

https://login.wx.qq.com/jslogin?appid=wx782c26e4c19acffb&redirect_uri=https%3A%2F%2Fwx.qq.com%2Fcgi-bin%2Fmmwebwx-bin%2Fwebwxnewloginpage&fun=new&lang=zh_CN&_=1476606163580

  1. appid: wx782c26e4c19acffb(固定值)
  2. redirect_rui: https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage(url编码)
  3. fun:new(固定值)
  4. lang: zh_CN(固定值)
  5. _: unix时间戳

小组的名字明显了,晨诵起首了,班徽设计也基本完结,每一天佳句也初阶抄写起来,接下去的生活更好玩了。

响应

window.QRLogin.code = 200; window.QRLogin.uuid = "gf5Gk61zEA=="; 
window.QRLogin.uuid的值就是大家要求的uuid

前一章:第一遍晨诵

1.2 获取二维码(get)

凉秋(4)语文课要怎么上


1

各个首席执行官把作业检查意况总括出来,并且何人能够哪个人一般哪个人倒霉也都分别好了,在课间的时候,多少个经理拿来交付小编了。

崔雨霞抱着几本组员的课业,平素到最后都不甩手。等到其它老总都距离了,她才说:“作者手里有一份作业尤其美好,想亲自拿给您看看,所以小编平昔等着。”

本人惊喜地瞅着他:“是什么人的功课这么雅观呢?你给自己讲述下?”

“她的首先封信,带有花边装饰,书写也正如认真,笔者觉着那是一份榜样作业。”崔雨霞非常当真地回应笔者。

“我们的那一个周末书信,笔者一定是要每一个察看,并做出回复的。你把作业先放那里呢!小编回头再看。”

崔雨霞离开小编的屋子后,笔者就开辟了他们小组的功课。

在新教育的体育地方里,均是以学科为主的,无论哪一类课程,在实践评价的进度中,都有榜样加底线的标准化。

所谓榜样,便是一对佳绩的学业,用来给其余儿女模仿和上学的;而底线,则是一个最底的功课保障。

在很多讲堂里,都有规范作业,也叫卓越作业,也许模范作业。

其一老总看到的课业,应该就是这么一份精美作业吧!

不精通那份作业是什么的一种态度,打以震撼首席营业官的心,让他能不惜耗时等着推荐给自个儿。

诸如此类想着的时候,这心里竟也对那份作业有了一份希望之心了。

2

算是打开了那份作业,呈以往自小编前边的是一份色彩纷呈的美:

书写规范整洁,笔画正确流利,横平竖直,大小均匀,分段也正如客观,更为难得的是,在那份总计的四周,画上了绿盈盈的技条,柔枝缠绵绕绕覆盖了那份总括。

越看越喜欢,我总感觉到那基本的作品和外面的枝条那么和谐地结合着,犹如一处农家田园,一方远离人烟。

自身笑着在计算后画了一颗大大的星星,并书写上那样一句话:

“用心的课业,无论什么日期都会获得外人的鉴赏和喜欢,谢谢您的交付,为真他同学创立了一份榜样作业!+10元Smart币!”

批写上日期未来,作者才开首读那份来自第⑧日的总括。

那份作业的全体者是柳叶青,作业本上写下的名字格外修长,就跟真的柳叶一样隽永优良。一笔一划都富有一点都不小的体魄,看着,小编必须得认可,笔者那老师的字也一贯不那孩子写得不错!

那份总括那样写的——

作者们的班级不一般

开学第1周,自从进那间体育场合发轫,就注定着不一般。都有何样不一般呢?请听作者稳步说。

首先是第壹天点名不一般。其余班级里,老师平昔拿着花名册,名字一喊学生一答完了。大家教育工小编啊,带着大家读了一首诗,用了那么多的雅观的修辞,那么多闪光的用语,让我们每一位都感觉到祥和的名字卓殊。

其次是教授发书的时候不一般。书本发到大家手中之后,给大家讲了那么多珍爱书本的道理,让大家理解了书是有脸的,必要大家去爱护。要精通,在大家原先的光阴里,书本不正是纸吗?大家想怎么画就怎么画,平素不晓得它是有脸的,它供给大家去保养。

其三个不一般,正是我们的班级,盛名字,有班歌,有班徽,有班诗,还有班级美好的未来。其实最最奇特的是,大家种种小组都有友好的名字,多少个闪闪发光,铿锵有力的名字,那个名字就是大家的前程。

再有呀,大家每一日在黑板上抄写赏心悦目的语段,每星期都要学习美美的诗文。这几个诗句真的极漂亮,读起来都深感唇齿生香了啊,小编总在想,要是有一天,我也能写出来那样美的诗歌,该有多好哎。

想想看,坐在那样一间不一般的教室里,日子该有多么美!

读完了那位柳叶青的星期一总括,小编的心目充满着一股甜甜的滋味儿,就在那一刻,小编觉得教语文是何其美好的一件事儿!

3

拿着新新的读本伊始上语文课了,其实笔者是有点犯愁的,因为自个儿压根不精晓语文课该怎么上。

纵然说不会上语文课,不过自身掌握一件事,孩子们读了如此多年的书,听老师讲了那般长年累月的课,他们相应通晓语文课怎么上。

走进体育场地,孩子们都睁大着眼睛,作者瞧着那一双双稚嫩的脸面,笔者想,他们是在期待万分的教师会怎么着起始首先课。

安然地看了男女们一圈之后,作者在黑板上写了如此多少个字:语文课到底要怎么?

那个字一出来,体育场面里炸开了锅,多个个张着嘴说起来。

看着他们不讲话,因为前面作者早就和她们预约:难题借使产生,我们都要相互钻探,各个组先形成和谐的见解,然后公开出来和大家沟通。

几分钟过去之后,种种小组都选了和睦的积极分子起来表明了。

起先站起来表明的,依旧大家的班长曾三妮,她看着自家,陈述本人小组的见地:“语文课首先要会读,把每篇课文美美地读出来,读准确,读流畅。”

副班长陈翔(英文名:chén xiáng)哪能落后啊?在曾三妮的话音刚落,他就一下子站起来:“大家小组觉得,语文课要背诵应该会背的事物。”

她这么的陈述让小编笑了:“那你觉得怎样东西是理所应当会背的东西呢?”

“就像课后学业呀,课后供给让背诵的东西啊,都以理所应当会背的。”他慌忙地表达了一句,就一屁股坐下了。

“语文课,应该把每篇课文的生字全体都会写,会用它造句,说话。”这几个叫做薛猛的小男童,作者难忘他尿床的经验了,他不疾不徐地说完那句话。

“语文课,应该学会欣赏小说个中精彩的言语。”我毕竟等到那个声音了,那么些名叫柳叶青的女孩站起来,轻轻地那样表述。

“还有其余人要说吗?”小编环视了我们二回,轻轻问道。

“语文课,还相应要学会写作,会说话把看到的、想到的写下去,说明出来才是真正的语文课。”这么些不是很高昂,却很显著的响动,从体育场地最前边传了回复,大家都循声望过去,是闫羽悦,在自家的记念中,她的学习战绩不是太好,可是却是班级中个头高高的的一个上学的小孩子,照旧位女人。

男女们那样的陈述真是非常漂亮,作者不可能不击掌。鼓完掌之后,小编计算了须臾间:“在豪门的陈述当中,笔者了解了语文课终究要怎么,要会阅读,要会背诵,要会写字,要会讲话,要会撰写,要会知晓,要会表达。我们说得很完整,那能够验证,我们都得以学好语文。”

孩子们的肉眼都在闪闪发光,在她们前边的语工学习,平昔不曾经历过这么的课堂吧!

“未来大家知道了,语文课毕竟要干什么。那么接下去大家的课堂就由大家自身来形成。”说完了那句话作者倍感到子女们的肉眼里有了为之侧目标猜疑和震惊,于是小编跟着又解释了须臾间,“也便是说大家刚刚计算的那个剧情,要靠我们我们来互相成就!”

说完了那番话,作者把这么些词语写在黑板上宣读、背诵、写字、说话、精晓、表明、写作,然后又扭向了我们:“大家每种小组捌个人,黑板上海市总共有多个方面包车型大巴始末,我们小组内的积极分子各类人承包1个方面,大家的上学职责就能够完毕了。”

自作者如此一说,孩子们的双眼瞪得更大了,里边的惊奇成份更足了。

4

自家走在儿女们中间,轻轻地向她们精晓:“那多少个方面的始末你觉得哪一方面最难?”

儿女们面有难色,不或许回答。

自个儿拉起了1个男孩,还不知情他叫什么名字,微笑着问:“你明白如何叫朗读吧?你可见督促你的组员都会把课文朗读下去吗?”

那男孩点点头,害羞地坐下了。

笔者随着刚才的话题,又拉起了三个女子,继续来打听:“你能够把课文中的生字词语都写正确吧?读了课文之后,你能够用这几个词语说一句话吗?你可见督促你小组内的各样成员都达成那一点职务吗?”

本条娃娃也是脸红扑扑地坐下了。

“大家每一种人都要来承接2个上面包车型客车剧情,自个儿先把这一块实现,然后再督促大家小组内的每种成员来完结。当我们都极力之后,还未曾缓解的那某些,留下来交给老师,指导着大家一道达成。小编的语文课就是那般考虑的,正是说小编梦想我们个中的每二个都能够成为会学习善于学习的儿女。”

儿女们的眉头终于舒展开了,但是还有的人不放心,因为他的眉头一直尚未展开,反而是越发紧凑地皱在一齐。

有个男孩站起来将了本身一军:“假使本人每一项都不可见好好的达成怎么做?”

“你今后只是假诺,作者梦想当你用行动去做了后来,你再来说你能否好好的实现。”笔者那样回复她,终归他从没动,没有交给行动。

临下课的时候,小编告诉子女们说:“我们每一位在小的时候,是被阿娘抱着牵着长大的,学习也是如出一辙。我们在① 、二年级的时候,老师早已把大家领到了就学的寺庙,我们会中文拼音,我们会查字典,大家就要协调学会读书,因为你在一每一天长大。笔者深信不疑在我们开始展览自学,互帮互学的进程个中,每一种人都会用自身的行进为和谐挣得一份美丽的大成。”

说完本人转身离开,孩子们叽叽喳喳就探讨起来,他们一度上马在谈论什么人负责什么的题材了。

请求

https://login.weixin.qq.com/qrcode/gf5Gk61zEA== 
固定格式: https://login.weixin.qq.com/qrcode/{uuid}

二维码

https://login.weixin.qq.com/l/gf5Gk61zEA== 
固定格式: https://login.weixin.qq.com/l/{uuid}

1.3 等候登录扫描(get轮询)

请求

https://login.wx.qq.com/cgi-bin/mmwebwx-bin/login?loginicon=true&uuid=gf5Gk61zEA==&tip=0&r=862560455&_=1476606163582

  1. loginicon:true
  2. uuid: uuid
  3. tip:0
  4. r:862560455(非必须)
  5. _: unix时间戳

响应

  1. window.code=408;// 登录超时(408)
  2. window.code=201;window.userAvatar='data:img/jpg;base64';// 扫描成功(201), userAvatar为用户头像
  3. window.code=200;// 确认登录(200), redirect_uri获取cookie
  4. window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=AYfheMIH6tt9EmcZ0DxCKF4a@qrticket_0&uuid=YeGrrvqmHQ==&lang=zh_CN&scan=1476606728";

1.4 登录后获得cookie(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=AYfheMIH6tt9EmcZ0DxCKF4a@qrticket_0&uuid=YeGrrvqmHQ==&lang=zh_CN&scan=1476606728&fun=new&version=v2&lang=zh_CN
上一步的redirect_uri

响应

  1. <error>
  2. <ret>0</ret>
  3. <message></message>
  4. <skey>@crypt_14ae1b12_b73ba2673448154847d7007a2de3c53b</skey>
  5. <wxsid>jSsRlGGPyY7U8det</wxsid>
  6. <wxuin>566148615</wxuin>
  7. <pass_ticket>kUY4PSgKNy4eOlWI%2FwIBMVULe3KHPVyvDqw1%2B4DVVu9McVvE2d5fL7LFOfa4iYnk</pass_ticket>
  8. <isgrayscale>1</isgrayscale>
  9. </error>

skeywxsidwxuinpass_ticket和重返的cookie都亟待保留(后面要用)


2.获取音信

2.1 初始化(post)

赢得联系人音讯, 公众号消息, 本人的账号新闻

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?r=862039733&lang=zh_CN&pass_ticket=kUY4PSgKNy4eOlWI%252FwIBMVULe3KHPVyvDqw1%252B4DVVu9McVvE2d5fL7LFOfa4iYnk

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

  1. {
  2. "BaseRequest":{
  3. "Uin":"566148615",
  4. "Sid":"jSsRlGGPyY7U8det",
  5. "Skey":"@crypt_14ae1b12_b73ba2673448154847d7007a2de3c53b",
  6. "DeviceID":"e119795675188164"
  7. }
  8. }

  1. Uin,Sid,Skey:登录后获取的xml中的数据
  2. DeviceID: e +随机数

响应

  1. {
  2. "BaseResponse":{
  3. "Ret":0,
  4. "ErrMsg":""
  5. },
  6. "Count":11,
  7. "ContactList":[...],//联系人信息, 公众号信息, 群
  8. "SyncKey":{
  9. "Count":4,
  10. "List":[
  11. {
  12. "Key":1,
  13. "Val":635705559
  14. },
  15. ...//同步key值, 下次请求时要写到上
  16. ]
  17. },
  18. "User":{
  19. "Uin": xxx,
  20. "UserName": xxx,
  21. "NickName": xxx,
  22. "HeadImgUrl": xxx,
  23. "RemarkName":"",
  24. "PYInitial":"",
  25. "PYQuanPin":"",
  26. "RemarkPYInitial":"",
  27. "RemarkPYQuanPin":"",
  28. "HideInputBarFlag":0,
  29. "StarFriend":0,
  30. "Sex":1,
  31. "Signature":"Apt-get install B",
  32. "AppAccountFlag":0,
  33. "VerifyFlag":0,
  34. "ContactFlag":0,
  35. "WebWxPluginSwitch":0,
  36. "HeadImgFlag":1,
  37. "SnsFlag":17
  38. },
  39. "ChatSet":"xxx",
  40. "SKey":"@crypt_14ae1b12_b73ba2673448154847d7007a2de3c53b",
  41. "ClientVersion":369302288,
  42. "SystemTime":1476608977,
  43. "GrayScale":1,
  44. "InviteStartCount":40,
  45. "MPSubscribeMsgCount":7,
  46. "ClickReportInterval":600000
  47. }

2.2 标记已读(post)

客户端读取音讯后要提倡呼吁, 告诉服务器音信已经读取, 从而文告手提式有线电话机客户端

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify?pass_ticket=ZDJfLCa0EAKrLn2CdD7MDl%252B54GwlW0IEiwYOsm6II%252F8W57y0pF1F8fqS%252B5z4INU5

  1. pass_ticket 登录请求返回的xml中的值
  • header 
    Content-Type:application/json;charset=UTF-8

  • content

  1. {
  2. "BaseRequest":{
  3. "Uin":566148615,
  4. "Sid":"EKjoZCMRIvrY7NIP",
  5. "Skey":"@crypt_14ae1b12_f59314a579c67b15f838d09feb79c17f",
  6. "DeviceID":"e098855372553243"
  7. },
  8. "Code":3,
  9. "FromUserName":自己ID,
  10. "ToUserName":自己ID,
  11. "ClientMsgId":时间戳
  12. }

响应

  1. {
  2. "BaseResponse":{
  3. "Ret":0,
  4. "ErrMsg":""
  5. },
  6. "MsgID":"1525762281689643050"
  7. }

2.3 获取联系人新闻列表(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact?pass_ticket=ZDJfLCa0EAKrLn2CdD7MDl%252B54GwlW0IEiwYOsm6II%252F8W57y0pF1F8fqS%252B5z4INU5&r=1476608979549&seq=0&skey=@crypt_14ae1b12_f59314a579c67b15f838d09feb79c17f

  1. pass_ticket 登录请求中返回xml中获取
  2. seq 0(固定值)
  3. skey 初始化请求中获取

响应

  1. {
  2. "BaseResponse":{
  3. "Ret":0,
  4. "ErrMsg":""
  5. },
  6. "MemberCount":637,
  7. "MemberList":[
  8. {
  9. "Uin":0,
  10. "UserName": xxx,
  11. "NickName":"LbbNiu",
  12. "HeadImgUrl": xxx,
  13. "ContactFlag":3,
  14. "MemberCount":0,
  15. "MemberList":[],
  16. "RemarkName":"",
  17. "HideInputBarFlag":0,
  18. "Sex":0,
  19. "Signature":"IT全才-LbbNiu",
  20. "VerifyFlag":8,
  21. "OwnerUin":0,
  22. "PYInitial":"LbbNiu",
  23. "PYQuanPin":"LbbNiu",
  24. "RemarkPYInitial":"",
  25. "RemarkPYQuanPin":"",
  26. "StarFriend":0,
  27. "AppAccountFlag":0,
  28. "Statues":0,
  29. "AttrStatus":0,
  30. "Province":"",
  31. "City":"",
  32. "Alias":"Urinxs",
  33. "SnsFlag":0,
  34. "UniFriend":0,
  35. "DisplayName":"",
  36. "ChatRoomId":0,
  37. "KeyWord":"gh_",
  38. "EncryChatRoomId":""
  39. }
  40. ....//联系人列表
  41. ],
  42. "Seq":0
  43. }

2.4 获取聊天会话列表(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=1476608979648&pass_ticket=ZDJfLCa0EAKrLn2CdD7MDl%252B54GwlW0IEiwYOsm6II%252F8W57y0pF1F8fqS%252B5z4INU5

  1. type ex(固定值)
  2. r 当前时间戳
  3. pass_ticket 登录请求中返回xml中获取
  • header 
    Content-Type:application/json;charset=UTF-8

  • content

  1. {
  2. "BaseRequest":{
  3. "Uin":566148615,
  4. "Sid":"EKjoZCMRIvrY7NIP",
  5. "Skey":"@crypt_14ae1b12_f59314a579c67b15f838d09feb79c17f",
  6. "DeviceID":"e316575061818116"
  7. },
  8. "Count":7,
  9. "List":[
  10. {
  11. "UserName":"@@e2da072e5beda58413f788fd2978b6f9fbde2ba337a71f02e1458958fcdb8371",//去要获取的群UserName
  12. "ChatRoomId":""
  13. }…
  14. ]
  15. }

响应

  1. {
  2. "BaseResponse":{
  3. "Ret":0,
  4. "ErrMsg":""
  5. },
  6. "Count":7,
  7. "ContactList":[
  8. ]
  9. }

2.5 同步刷新(get轮询)

请求

https://webpush.wx.qq.com/cgi-bin/mmwebwx-bin/synccheck?r=1476611147442&skey=%40crypt_14ae1b12_f59314a579c67b15f838d09feb79c17f&sid=EKjoZCMRIvrY7NIP&uin=566148615&deviceid=e673682280871456&synckey=1_643606091%7C2_643606203%7C3_643606171%7C11_643605834%7C13_643590001%7C201_1476611120%7C1000_1476610779%7C1001_1476590971%7C1004_1475896795&_=1476611120940

r 时间戳

skey 初始化信息中获取

sid 登录请求中返回xml中获取

uin 登录请求中返回xml中获取

synckey 初始化信息中获取

deviceid 设备id

_ 时间戳

响应

window.synccheck={retcode:"0",selector:"2"}

retcode:

0正常

1100失败/登出微信

selector:

0正常

2新的消息

4通过时发现,删除好友

6删除时发现和对方通过好友验证

7进入/离开聊天界面(可能没有了)

2.6 获取音信(post, cookie)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=2qui+CC4YTiiI2zk&skey=@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0&lang=zh_CN&pass_ticket=tM909DkHH8fXLR7hhwIgn9MqmSuCxx6%252BcdaA9qE203zxP7fMT%252FtxPlY7opbnnVE2

pass_ticket 登录请求中返回xml中获取

r 时间戳

skey 初始化信息中获取

sid 登录请求中返回xml中获取

lang zh_CN

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"BaseRequest":{

"Uin":566148615,

"Sid":"2qui+CC4YTiiI2zk",

"Skey":"@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0",

"DeviceID":"e151332185497293"

},

"SyncKey":{

"Count":9,

"List":[

{"Key":1,"Val":643606091},

{"Key":2,"Val":643606236},

{"Key":3,"Val":643606171},

{"Key":11,"Val":643606232},

{"Key":13,"Val":643590001},

{"Key":203,"Val":1476612126},

{"Key":1000,"Val":1476610779},

{"Key":1001,"Val":1476590971},

{"Key":1004,"Val":1475896795}

]

},

"rr":856481324

}

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"AddMsgCount":1,

"AddMsgList":[

{

"MsgId":"8410419333108271670",

"FromUserName":"@595d9f44c64e2f480baa0d6430ca58ef053a768daa6d7b3fcc4bece244bcbce3",

"ToUserName":"@e5403f77c2193da671790c1a242d0b43ac6f570e5047993ef745d13d6376b57b",

"MsgType":51,

"Content":"&lt;msg&gt;<br/>&lt;op id='5'&gt;<br/>&lt;username&gt;wxid_e602if1itlm821&lt;/username&gt;<br/>&lt;/op&gt;<br/>&lt;/msg&gt;",

"Status":3,

"ImgStatus":1,

"CreateTime":1476612570,

"VoiceLength":0,

"PlayLength":0,

"FileName":"",

"FileSize":"",

"MediaId":"",

"Url":"",

"AppMsgType":0,

"StatusNotifyCode":5,

"StatusNotifyUserName":"@e5403f77c2193da671790c1a242d0b43ac6f570e5047993ef745d13d6376b57b",

"RecommendInfo":{

"UserName":"",

"NickName":"",

"QQNum":0,

"Province":"",

"City":"",

"Content":"",

"Signature":"",

"Alias":"",

"Scene":0,

"VerifyFlag":0,

"AttrStatus":0,

"Sex":0,

"Ticket":"",

"OpCode":0

},

"ForwardFlag":0,

"AppInfo":{

"AppID":"",

"Type":0

},

"HasProductId":0,

"Ticket":"",

"ImgHeight":0,

"ImgWidth":0,

"SubMsgType":0,

"NewMsgId":8410419333108272000

}

],

"ModContactCount":0,

"ModContactList":[],

"DelContactCount":0,

"DelContactList":[],

"ModChatRoomMemberCount":0,

"ModChatRoomMemberList":[],

"Profile":{

"BitFlag":0,

"UserName":{

"Buff":""

},

"NickName":{

"Buff":""

},

"BindUin":0,

"BindEmail":{

"Buff":""

},

"BindMobile":{

"Buff":""

},

"Status":0,

"Sex":0,

"PersonalCard":0,

"Alias":"",

"HeadImgUpdateFlag":0,

"HeadImgUrl":"",

"Signature":""

},

"ContinueFlag":0,

"SyncKey":{

"Count":10,

"List":[

{

"Key":1,

"Val":643606091

}

.....//同步key

]

},

"SKey":"",

"SyncCheckKey":{

"Count":10,

"List":[

{

"Key":1,

"Val":643606091

}

.....//同步检测消息key

]

}

}

2.7 状态报告(post)

仅用于总结

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatreport?fun=new&lang=zh_CN

  • header 
    Content-Type:application/json;charset=UTF-8
  • content

3.消息

3.1 文字新闻(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?lang=zh_CN&pass_ticket=tM909DkHH8fXLR7hhwIgn9MqmSuCxx6%252BcdaA9qE203zxP7fMT%252FtxPlY7opbnnVE2

lang zh_CN

pass_ticket 登录后返回信息中获取

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"BaseRequest":{

"Uin":566148615,

"Sid":"2qui+CC4YTiiI2zk",

"Skey":"@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0",

"DeviceID":"e784205590563506"

},

"Msg":{

"Type":1,

"Content":"@啊啊啊 啊啊啊啊啊啊",

"FromUserName":"@595d9f44c64e2f480baa0d6430ca58ef053a768daa6d7b3fcc4bece244bcbce3",

"ToUserName":"@@9e1c0ab62b5ab222835786c00192fb1e10c75f8082c245d360ac6a6bd2efe2df",

"LocalID":"14766146756340722",

"ClientMsgId":"14766146756340722"

},

"Scene":0

}

Type:1(文字消息),

Content:要发送的消息,

FromUserName:自己ID,

ToUserName:好友ID,

LocalID:与clientMsgId相同,

ClientMsgId:时间戳左移4位随后补上4位随机数

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"MsgID":"4527210051674039705",

"LocalID":"14766146756340722"

}

3.2 表情新闻(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendemoticon?fun=sys&lang=zh_CN

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"BaseRequest":{

"Uin":566148615,

"Sid":"2qui+CC4YTiiI2zk",

"Skey":"@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0",

"DeviceID":"e961665475339031"

},

"Msg":{

"Type":47,

"EmojiFlag":2,

"EMoticonMd5":"44682e637b75a3f5d6747d61dbd23a15",

"FromUserName":"@595d9f44c64e2f480baa0d6430ca58ef053a768daa6d7b3fcc4bece244bcbce3",

"ToUserName":"@e5403f77c2193da671790c1a242d0b43ac6f570e5047993ef745d13d6376b57b",

"LocalID":"14766150190560991",

"ClientMsgId":"14766150190560991"

},

"Scene":0

}

 

Type:47 emoji消息,

EmojiFlag:2,

MediaId:表情上传后的媒体ID,

FromUserName:自己ID,

ToUserName:好友ID,

LocalID:与clientMsgId相同,

ClientMsgId:时间戳左移4位随后补上4位随机数

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"MsgID":"1604548346807369725",

"LocalID":"14766150190560991"

}

3.3 图片音讯

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsgimg?fun=async&f=json&lang=zh_CN

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"BaseRequest":{

"Uin":566148615,

"Sid":"2qui+CC4YTiiI2zk",

"Skey":"@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0",

"DeviceID":"e374531581999650"

},

"Msg":{

"Type":3,

"MediaId":"@crypt_4d268bd0",

"FromUserName":"@595d9f44c64e2f480baa0d6430ca58ef053a768daa6d7b3fcc4bece244bcbce3",

"ToUserName":"@e5403f77c2193da671790c1a242d0b43ac6f570e5047993ef745d13d6376b57b",

"LocalID":"14766158484990338",

"ClientMsgId":"14766158484990338"

},

"Scene":0

}

 

Type:3媒体消息,

MediaId:表情上传后的媒体ID,

FromUserName:自己ID,

ToUserName:好友ID,

LocalID:与clientMsgId相同,

ClientMsgId:时间戳左移4位随后补上4位随机数

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"MsgID":"6722400141243782346",

"LocalID":"14766158484990338"

}

3.4 文件音讯(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendappmsg?fun=async&f=json

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"BaseRequest":{

"Uin":566148615,

"Sid":"NO0RlTCXvpBGaag7",

"Skey":"@crypt_14ae1b12_3bdec7023595f68f9900b5d9d7d30b75",

"DeviceID":"e984332143788024"

},

"Msg":{

"Type":6,

"Content":"<appmsg appid='wxeb7ec651dd0aefa9' sdkver=''><title>top10.csv</title><des></des><action></action><type>6</type><content></content><url></url><lowurl></lowurl><appattach><totallen>1760</totallen><attachid>@crypt_f672a24d_9d9c7d6a3b5ec058db1e6eb3d7c66917ede2e615535e9659365322de110ac41877d9a3b878ed82c0959f9b4602ef6e6d784ae853ab4e242d201cb19b9ee255a337f884eab998c5c43e7d433c01f14c91</attachid><fileext>csv</fileext></appattach><extinfo></extinfo></appmsg>",

"FromUserName":"@257b5aa7fb7b1672afb889be97197478cf618d9bab2b470cf767a61ae9f7f321",

"ToUserName":"@@ab3e18c922f8ab162762f6da231236137ca52871419ec9cafc2421607e82e1ca",

"LocalID":"14767614604200494",

"ClientMsgId":"14767614604200494"

},

"Scene":0

}

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"MsgID":"6923581840474342573",

"LocalID":"14767614604200494"

}

3.5 上传附属类小部件(post)

请求

https://file.wx.qq.com/cgi-bin/mmwebwx-bin/webwxuploadmedia?f=json

  • header 
    Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryoWmrkW7MIGyBhlOt

  • content

id 文件id

name 文件名

type 文件类型

lastModifieDate 最后修改时间

size 文件大小

mediatype 文件媒体类型 doc pic

uploadmediarequest(json字符串)

UploadType上传类型2

BaseRequest

Uin登录中获得

Sid登录中获得

Skey登录中获得

DeviceID设备id

ClientMediaId文件本地消息id

TotalLen文件总大小

StartPos开始位置

DataLen数据长度

MediaType媒体类型4

FromUserName发送用户id

ToUserName接受用户id

FileMd5文件md5

webwx_data_ticket cookie中信息

pass_ticket

filename 文件流

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

,

"MediaId":"@crypt_6084141c_c73c046b750fd6e3e82d0aba4839b89b30851de7eace0446a4f73b524e3b43d41b24048e9c10cf7ba3387d04d63e6bd75bf8e3237acdddda5d4e3ede176617370573ebb2f820595076c55906a50a50a7",

"StartPos":25929,

"CDNThumbImgHeight":0,

"CDNThumbImgWidth":0

}

3.6 图片新闻

3.6.1 音讯图片(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg?&MsgID=6829659093985341608&skey=%40crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0&type=slave

MsgID:消息ID

type: slave 略缩图or为空时加载原图

skey: xxx

3.6.2 联系人头像(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon?seq=637275253&username=@aa357b7fc1ccb2e77a2632a6251fb6de2c5dd1c0ec503f04b25cfd34c256956a&skey=@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0

seq:数字,可为空

username: ID

skey: xxx

3.6.3 群头像(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg?seq=0&username=@@eca74ece82ad7947d262c59d53ab5d001e8776374141377cc025956b44bd1c03&skey=@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0

seq:数字,可为空

username:群ID

skey: xxx

3.7 多媒体接口

3.7.1 语音讯息(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice?msgid=6181125285738858128&skey=@crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0

msgid:消息ID

skey: xxx

3.7.2 录制消息(get)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo?msgid=114757855447263581&skey=%40crypt_14ae1b12_1bb5e370393b8cd502919825fe9dbfc0

msgid:消息ID

skey: xxx

3.7.3 其余文件(get)

请求

https://file.wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmedia?sender=@@aa4d90eee1984452cfacf8b510ce6547af58aa4fe34fe567787c716fd262d42c&mediaid=@crypt_3d1bb9c7_7f07116cc9b86e9d8237ad938293eee8a820acfa35e7bdaa41a03fc2fb17b60a4c6da7f967714259dec587505a1b55b10e61e301f733ec718167d8d355f8809257d3fbf382d775e2872e552957e894d52060d8766133214a58ea017e6416216c9f6f1d6056e5b22fe6c78a50efcf384969a7e1b96f348f581853b41be070c16ea4d510b8d10d747a3fc5a3909e1ed2deea43aa6db558c6dd58d453e8d6235d9f6a7c7bc0eb752fb5aee59568ab8de8ff38e0064b827765ae847d6a3503fba9a970006d18f0092a12811ccaec57c071bd&filename=51CTO%E4%B8%8B%E8%BD%BD-MySQL%E6%80%A7%E8%83%BD%E8%B0%83%E4%BC%98%E4%B8%8E%E6%9E%B6%E6%9E%84%E8%AE%BE%E8%AE%A1.pdf&fromuser=1443149207&pass_ticket=td%252BZEx1ANBEB8wz%252BxjYhotl3fChIto%252FyC4w%252FNHMopoqOP8Eya9%252FivEs2lsPEDqEj&webwx_data_ticket=gSc8PoV98Y4y98pOsP6hmcpj

sender 发送者UserName

mediaid 媒体id

filename 文件名

fromuser 接受者UserName

pass_ticket 登录返回信息中

webwx_data_ticket cookie中信息

3.8 账号类型

  • 私家账号 以@起首, 例如: @xxx
  • 群聊 以@@开头, 例如: @@xxx
  • 公众号/服务号 以@开头, 但其VerifyFlag & 8 != 0

VerifyFlag:

一般公众号/服务号:8

微信自家的服务号:24

微信官方账号微信团队:56

  • 格外账号 有特殊的ID(文件传输助手之类)

filehelper, newsapp, fmessage, weibo, qqmail, fmessage, tmessage, qmessage, qqsync, floatbottle, lbsapp, shakeapp, medianote, qqfriend, readerapp, blogapp, facebookapp, masssendapp, meishiapp, feedsapp, voip, blogappweixin, weixin, brandsessionholder, weixinreminder, officialaccounts, notification_messages, wxitil, userexperience_alarm, notification_messages

3.9 消息类型

3.9.1 一般格式

{

"FromUserName":"",

"ToUserName":"",

"Content":"",

"StatusNotifyUserName":"",

"ImgWidth":0,

"PlayLength":0,

"RecommendInfo":{...},

"StatusNotifyCode":4,

"NewMsgId":"",

"Status":3,

"VoiceLength":0,

"ForwardFlag":0,

"AppMsgType":0,

"Ticket":"",

"AppInfo":{...},

"Url":"",

"ImgStatus":1,

"MsgType":1,

"ImgHeight":0,

"MediaId":"",

"MsgId":"",

"FileName":"",

"HasProductId":0,

"FileSize":"",

"CreateTime":1454602196,

"SubMsgType":0

}

MsgType:

1文本消息

3图片消息

34语音消息

37 VERIFYMSG 好友验证消息

40 POSSIBLEFRIEND_MSG

42共享名片

43视频通话消息

47动画表情

48位置消息

49分享链接

50 VOIPMSG

51微信初始化消息

52 VOIPNOTIFY

53 VOIPINVITE

62小视频

9999 SYSNOTICE

10000系统消息

10002撤回消息

3.9.2 微信开端化新闻

 

MsgType:51

FromUserName:自己ID

ToUserName:自己ID

StatusNotifyUserName:最近联系的联系人ID

Content:

<msg>

<op id='4'>

<username>

// 最近联系的联系人

filehelper,xxx@chatroom,wxid_xxx,xxx,...

</username>

<unreadchatlist>

<chat>

<username>

// 朋友圈

MomentsUnreadMsgStatus

</username>

<lastreadtime>

1454502365

</lastreadtime>

</chat>

</unreadchatlist>

<unreadfunctionlist>

// 未读的功能账号消息, 群发助手, 漂流瓶等

</unreadfunctionlist>

</op>

</msg>

3.9.3 文本音讯

MsgType:1

FromUserName:发送方ID

ToUserName:接收方ID

Content:消息内容

图片消息

MsgType:3

FromUserName:发送方ID

ToUserName:接收方ID

MsgId:用于获取图片

Content:

<msg>

<img length="6503" hdlength="0"/>

<commenturl></commenturl>

</msg>

3.9.4 小录制消息

 

MsgType:62

FromUserName:发送方ID

ToUserName:接收方ID

MsgId:用于获取小视频

Content:

<msg>

<img length="6503" hdlength="0"/>

<commenturl></commenturl>

</msg>

3.9.5 地理地方音讯

 

MsgType:1

FromUserName:发送方ID

ToUserName:接收方ID

Content: http://weixin.qq.com/cgi-bin/redirectforward?args=xxx

// 属于文本消息, 只不过内容是一个跳转到地图的链接

3.9.6 名片音信

 

MsgType:42

FromUserName:发送方ID

ToUserName:接收方ID

Content:

<?xml version="1.0"?>

<msg bigheadimgurl="" smallheadimgurl="" username="" nickname="" shortpy=""alias="" imagestatus="3" scene="17" province="" city="" sign="" sex="1" certflag="0" certinfo="" brandIconUrl="" brandHomeUrl="" brandSubscriptConfigUrl="" brandFlags="0" regionCode=""/>

RecommendInfo:

{

"UserName":"xxx",// ID

"Province":"xxx",

"City":"xxx",

"Scene":17,

"QQNum":0,

"Content":"",

"Alias":"xxx",// 微信号

"OpCode":0,

"Signature":"",

"Ticket":"",

"Sex":0,// 1:男, 2:女

"NickName":"xxx",// 昵称

"AttrStatus":4293221,

"VerifyFlag":0

}

3.9.7 语音讯息

 

MsgType:34

FromUserName:发送方ID

ToUserName:接收方ID

MsgId:用于获取语音

Content:

<msg>

<voicemsg endflag="1" cancelflag="0" forwardflag="0" voiceformat="4" voicelength="1580" length="2026" bufid="216825389722501519" clientmsgid="49efec63a9774a65a932a4e5fcd4e923filehelper174_1454602489" fromusername=""/>

</msg>

3.9.8 动画表情

 

MsgType:47

FromUserName:发送方ID

ToUserName:接收方ID

Content:

<msg>

<emoji fromusername ="" tousername ="" type="2"

idbuffer="media:0_0" md5="e68363487d8f0519c4e1047de403b2e7"

len ="86235"

productid="com.tencent.xin.emoticon.bilibili"

androidmd5="e68363487d8f0519c4e1047de403b2e7"

androidlen="86235"

s60v3md5 ="e68363487d8f0519c4e1047de403b2e7"

s60v3len="86235"

s60v5md5 ="e68363487d8f0519c4e1047de403b2e7" s60v5len="86235"

cdnurl ="http://emoji.qpic.cn/wx_emoji/eFygWtxcoMF8M0oCCsksMA0gplXAFQNpiaqsmOicbXl1OC4Tyx18SGsQ/"

designerid =""

thumburl ="http://mmbiz.qpic.cn/mmemoticon/dx4Y70y9XctRJf6tKsy7FwWosxd4DAtItSfhKS0Czr56A70p8U5O8g/0"

encrypturl ="http://emoji.qpic.cn/wx_emoji/UyYVK8GMlq5VnJ56a4GkKHAiaC266Y0me0KtW6JN2FAZcXiaFKccRevA/"

aeskey="a911cc2ec96ddb781b5ca85d24143642">

</emoji>

<gameext type="0" content="0"></gameext>

</msg>

3.9.9 普通链接或使用分享音讯

 

MsgType:49

AppMsgType:5

FromUserName:发送方ID

ToUserName:接收方ID

Url:链接地址

FileName:链接标题

Content:

<msg>

<appmsg appid="" sdkver="0">

<title></title>

<des></des>

<type>5</type>

<content></content>

<url></url>

<thumburl></thumburl>

...

</appmsg>

<appinfo>

<version></version>

<appname></appname>

</appinfo>

</msg>

3.9.10 音乐链接新闻

 

MsgType:49

AppMsgType:3

FromUserName:发送方ID

ToUserName:接收方ID

Url:链接地址

FileName:音乐名

AppInfo:// 分享链接的应用

{

Type:0,

AppID: wx485a97c844086dc9

}

Content:

<msg>

<appmsg appid="wx485a97c844086dc9" sdkver="0">

<title></title>

<des></des>

<action></action>

<type>3</type>

<showtype>0</showtype>

<mediatagname></mediatagname>

<messageext></messageext>

<messageaction></messageaction>

<content></content>

<contentattr>0</contentattr>

<url></url>

<lowurl></lowurl>

<dataurl>

http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46

</dataurl>

<lowdataurl>

http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&amp;guid=ffffffffc104ea2964a111cf3ff3edaf&amp;fromtag=46

</lowdataurl>

<appattach>

<totallen>0</totallen>

<attachid></attachid>

<emoticonmd5></emoticonmd5>

<fileext></fileext>

</appattach>

<extinfo></extinfo>

<sourceusername></sourceusername>

<sourcedisplayname></sourcedisplayname>

<commenturl></commenturl>

<thumburl>

http://imgcache.qq.com/music/photo/album/63/180_albumpic_143163_0.jpg

</thumburl>

<md5></md5>

</appmsg>

<fromusername></fromusername>

<scene>0</scene>

<appinfo>

<version>29</version>

<appname>摇一摇搜歌</appname>

</appinfo>

<commenturl></commenturl>

</msg>

3.9.11 群消息

 

MsgType:1

FromUserName:@@xxx

ToUserName:@xxx

Content:

@xxx:<br/>xxx

3.9.12 红包音信

 

MsgType:49

AppMsgType:2001

FromUserName:发送方ID

ToUserName:接收方ID

Content:未知

网页版(近年来走的是系统新闻)

 

MsgType:10000

FromUserName:发送方ID

ToUserName:自己ID

Content:

"你已添加了 xxx , 现在可以开始聊天了。"

"如果陌生人主动添加你为朋友, 请谨慎核实对方身份。"

"收到红包, 请在手机上查看"


4.好友操作

4.1 添加好友和由此好友验证(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxverifyuser?r=1476779339614&lang=zh_CN&pass_ticket=td%252BZEx1ANBEB8wz%252BxjYhotl3fChIto%252FyC4w%252FNHMopoqOP8Eya9%252FivEs2lsPEDqEj

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

    • 添加知音

{

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e799452821014375"

},

"Opcode":2,

"VerifyUserListSize":1,

"VerifyUserList":[

{

"Value":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f","VerifyUserTicket":""

}

],

"VerifyContent":"我是lbbniu.cn",

"SceneListCount":1,

"SceneList":[

33

],

"skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c"

}

- 通过好友验证

{

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e606224692711308"

},

"Opcode":3,

"VerifyUserListSize":1,

"VerifyUserList":[

{

"Value":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"VerifyUserTicket":"v2_9d2e1b01ee6de582a237f6369a6746c84d3a072b48bf36f152c5c947505e871189cafa09748e05bab27caf812a8f3a12d51da3dceda3cab5f52a406ec124a4a9@stranger"

}

],

"VerifyContent":"",

"SceneListCount":1,

"SceneList":[

33

],

"skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c"

}

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

}

4.2 好友验证新闻体

<msgfromusername="liubingbing889129"encryptusername="v1_18874657c313914eff3c00cfd89275a4fa5c0753c73a63d78b893dd29f814e0e2a34dabe550e3d4199b0c4d518d3019b@stranger"fromnickname="LbbNiu"content="验证消息内容"shortpy="LBBNIU"imagestatus="3"scene="14"country="CN"province="Beijing"city="Chaoyang"sign=""percard="1"sex="1"alias="lbbniu"weibo="http://t.qq.com/lbbniu"weibonickname="微博昵称"albumflag="3"albumstyle="0"albumbgimgid=""snsflag="17"snsbgimgid="http://mmsns.qpic.cn/mmsns/4376ae1e0cf0ccced233def9ad1560d0dec29d64941ab85a901c0129f89f98ce9b8524263f1c393a874098cc9f1e4961624ddae970ce1bc0/0"snsbgobjectid="12152681488304050449"mhash="c07f008cf5e3f34415e4baa355fb4f47"mfullhash="c07f008cf5e3f34415e4baa355fb4f47"bigheadimgurl="http://wx.qlogo.cn/mmhead/ver_1/qFZwXv2etMCTcs3RUKDOlmw9GQyMfAdYcbQyd5cH9SssCdTLFmjNdZyLkZ14DdpAUv9qwibl2icia1M6Mng30Adibw/0"smallheadimgurl="http://wx.qlogo.cn/mmhead/ver_1/qFZwXv2etMCTcs3RUKDOlmw9GQyMfAdYcbQyd5cH9SssCdTLFmjNdZyLkZ14DdpAUv9qwibl2icia1M6Mng30Adibw/132"ticket="v2_9d2e1b01ee6de582a237f6369a6746c84d3a072b48bf36f152c5c947505e871189cafa09748e05bab27caf812a8f3a12d51da3dceda3cab5f52a406ec124a4a9@stranger"opcode="2"googlecontact=""qrticket=""chatroomusername="1656114910@chatroom"sourceusername=""sourcenickname="">

<brandlistcount="0"ver="652639419"></brandlist>

</msg>

"RecommendInfo":{

"UserName":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"NickName":"LbbNiu",

"QQNum":0,

"Province":"",

"City":"æ",

"Content":"",

"Signature":"",

"Alias":"lbbniu",

"Scene":14,

"VerifyFlag":0,

"AttrStatus":4305791,

"Sex":1,

"Ticket":"v2_9d2e1b01ee6de582a237f6369a6746c84d3a072b48bf36f152c5c947505e871189cafa09748e05bab27caf812a8f3a12d51da3dceda3cab5f52a406ec124a4a9@stranger",

"OpCode":2

}

4.3 创制群聊(post)

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxcreatechatroom?r=1476618448303&lang=zh_CN

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"MemberCount":3,

"MemberList":[

{

"UserName":"@fe20084fb8e3b488f49d3df2bf3ec2837daeb468abfe62a48ef39a6e407cab0e"

},

....

],

"Topic":"",

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e280173725621646"

}

}

  1. UserName初始化接口中获取

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":"Everything is OK"

},

"Topic":"",

"PYInitial":"",

"QuanPin":"",

"MemberCount":3,

"MemberList":[

{

"Uin":0,

"UserName":"@fe20084fb8e3b488f49d3df2bf3ec2837daeb468abfe62a48ef39a6e407cab0e",

"NickName":"111111",

"AttrStatus":0,

"PYInitial":"",

"PYQuanPin":"",

"RemarkPYInitial":"",

"RemarkPYQuanPin":"",

"MemberStatus":0,

"DisplayName":"",

"KeyWord":""

},

...

],

"ChatRoomName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"BlackList":""

}

4.4 群聊踢人

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom?fun=delmember

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"DelMemberList":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"ChatRoomName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e934789096108643"

}

}

 

DelMemberList好友id

ChatRoomName群组id

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

,

"MemberCount":0,

"MemberList":[]

}

4.5 群聊约请好友

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom?fun=addmember

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"AddMemberList":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"ChatRoomName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e681854808526145"

}

}

 

AddMemberList好友id列表

ChatRoomName群组id

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

},

"MemberCount":1,

"MemberList":[

{

"Uin":0,

"UserName":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"NickName":"LbbNiu",

"AttrStatus":0,

"PYInitial":"",

"PYQuanPin":"",

"RemarkPYInitial":"",

"RemarkPYQuanPin":"",

"MemberStatus":0,

"DisplayName":"",

"KeyWord":""

}

...

]

}

4.6 修改群聊名称

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxupdatechatroom?fun=modtopic

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"NewTopic":"lbbniu.com",

"ChatRoomName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e326783138505913"

}

}

 

NewTopic新群名称

ChatRoomName群组id

响应

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

,

"MemberCount":0,

"MemberList":[]

}

4.7 置顶聊天

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxoplog

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"UserName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"CmdId":3,

"OP":1,

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e736741369963778"

}

}

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

}

4.8 打消置顶

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxoplog

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"UserName":"@@45340ba1e520285af196cef99d2f41a2bdb5cc568569efa178354f08eb863d00",

"CmdId":3,

"OP":0,

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e736741369963778"

}

}

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

}

4.9 给好友添加备注

请求

https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxoplog

  • header 
    Content-Type:application/json;charset=UTF-8

  • content

{

"UserName":"@2cbb226c459cc5203aa991942f41e19820f5ef3ccceb2dece598412f36406d1f",

"CmdId":2,

"RemarkName":"lbbniu.com",

"BaseRequest":{

"Uin":1443149207,

"Sid":"HqU75NIXRJ6qqu8t",

"Skey":"@crypt_d9da2d81_f3a62e80c16e61ad660dffd14e0ef72c",

"DeviceID":"e573447900268361"

}

}

响应

 

{

"BaseResponse":{

"Ret":0,

"ErrMsg":""

}

}

 

 

转发出处:
http://web.hanzheng.info/info/document/文档-web微信协议