国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Table of Contents
WeChat web protocol analysis (WeChat web version wx2.qq.com)
Execution process
WebWechat API
1. Get UUID (refer to method getUUID)
API
狀態(tài)通知(參考方法 wxStatusNotify)" >6. 開啟微信狀態(tài)通知(參考方法 wxStatusNotify)
7. 獲取聯(lián)系人列表(參考方法 getContact)
8.消息檢查(參考方法 syncCheck)
9. 獲取最新消息(參考方法 webwxsync)
10. 發(fā)送消息(參考方法 webwxsendmsg)
Home WeChat Applet WeChat Development Detailed explanation of WeChat protocol

Detailed explanation of WeChat protocol

May 06, 2017 am 10:27 AM

WeChat web protocol analysis (WeChat web version wx2.qq.com)

1. Open the homepage and assign a random uuid,
2. Get the QR code image based on the uuid.
3. WeChat client scans the picture and confirms login on the client.
4. The browser keeps calling an interface. If the login is successful, it calls the login interface
5. At this time, you can get the contact list and send a message. Then continuously call the synchronization interface.
6. If the synchronization interface returns, you can obtain new messages and then continue to call the synchronization interface.

Source code address: github.com/biezhi/wechat-robot

Execution process

???????+--------------+?????+---------------+???+---------------+
???????|??????????????|?????|???????????????|???|???????????????|
???????|???Get?UUID???|?????|??Get?Contact??|???|?Status?Notify?|
???????|??????????????|?????|???????????????|???|???????????????|
???????+-------+------+?????+-------^-------+???+-------^-------+
???????????????|????????????????????|???????????????????|
???????????????|????????????????????+-------+??+--------+
???????????????|????????????????????????????|??|
???????+-------v------+???????????????+-----+--+------+??????+--------------+
???????|??????????????|???????????????|???????????????|??????|??????????????|
???????|??Get?QRCode??|???????????????|??Weixin?Init??+------>??Sync?Check??<----+
       |              |               |               |      |              |    |
       +-------+------+               +-------^-------+      +-------+------+    |
               |                              |                      |           |
               |                              |                      +-----------+
               |                              |                      |
       +-------v------+               +-------+--------+     +-------v-------+
       |              | Confirm Login |                |     |               |
+------>????Login?????+--------------->?New?Login?Page?|?????|??Weixin?Sync??|
|??????|??????????????|???????????????|????????????????|?????|???????????????|
|??????+------+-------+???????????????+----------------+?????+---------------+
|?????????????|
|QRCode?Scaned|
+-------------+

WebWechat API

1. Get UUID (refer to method getUUID)

##dataURL Encodeparams##Return data (
API Get UUID
url https ://login.weixin.qq.com/jslogin
method GET
appid : wx782c26e4c19acffb
fun : new
lang : zh_CN
_ : Timestamp
String

) :

window.QRLogin.code = 200; window.QRLogin.uuid = "xxx"
2. Display QR code (refer to method showQrCode)

##APIDisplay QR codeurllogin.weixin.qq.com/qrcode/{uuid}methodPOSTparams : webwx
3. Wait for login (refer to method waitForLogin) Here is WeChat confirmation login
t _ : Timestamp


##APIQR code scan loginurllogin.weixin.qq.com/cgi-bin/mmwebwx-bin/loginGETtip Return data (String ):
window.code=xxx;

xxx:    408 登陸超時(shí)    201 掃描成功    200 確認(rèn)登錄

當(dāng)返回200時(shí),還會有
window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=xxx&uuid=xxx&lang=xxx&scan=xxx";
4. Log in to get
method
params
: 1: Not scanned 0 : Scanned uuid : Obtained uuid
_ : Timestamp
Cookie

(refer to method login)

APIwebwxnewloginpageurlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpageGETticketReturn Data (XML):
method
params
: xxx uuid : xxx
lang : zh_CN
scan : xxx
fun : new
<error>
    <ret>0</ret>
    <message>OK</message>
    <skey>xxx</skey>
    <wxsid>xxx</wxsid>
    <wxuin>xxx</wxuin>
    <pass_ticket>xxx</pass_ticket>
    <isgrayscale>1</isgrayscale></error>

In this step, get the skey,

wxsid

, wxuin, # in xml ##pass_ticket5. WeChat initialization (refer to method wxInit)

API

webwxiniturlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxinitmethodPOSTdataJSONContent -Type: application/json; charset=UTF-8params{ BaseRequest: { Uin: xxx, Skey: xxx,
  1. header
    Sid: xxx, DeviceID: xxx,
    }
    }


    ##

    返回?cái)?shù)據(jù)(JSON):

    {
        "BaseResponse": {
            "Ret": 0,
            "ErrMsg": ""
        },
        "Count": 11,
        "ContactList": [...],
        "SyncKey": {
            "Count": 4,
            "List": [
                {
                    "Key": 1,
                    "Val": 635705559
                },
                ...
            ]
        },
        "User": {
            "Uin": xxx,
            "UserName": xxx,
            "NickName": xxx,
            "HeadImgUrl": xxx,
            "RemarkName": "",
            "PYInitial": "",
            "PYQuanPin": "",
            "RemarkPYInitial": "",
            "RemarkPYQuanPin": "",
            "HideInputBarFlag": 0,
            "StarFriend": 0,
            "Sex": 1,
            "Signature": "Apt-get install B",
            "AppAccountFlag": 0,
            "VerifyFlag": 0,
            "ContactFlag": 0,
            "WebWxPluginSwitch": 0,
            "HeadImgFlag": 1,
            "SnsFlag": 17
        },
        "ChatSet": xxx,
        "SKey": xxx,
        "ClientVersion": 369297683,
        "SystemTime": 1453124908,
        "GrayScale": 1,
        "InviteStartCount": 40,
        "MPSubscribeMsgCount": 2,
        "MPSubscribeMsgList": [...],
        "ClickReportInterval": 600000
    }

    這一步中獲取 SyncKey, User 后面的消息監(jiān)聽用。

    6. 開啟微信狀態(tài)通知(參考方法 wxStatusNotify)

    APIwebwxstatusnotify
    urlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify
    methodPOST
    dataJSON
    headerContent-Type: application/json; charset=UTF-8
    params{
    BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx },
    Code: 3,
    FromUserName: 自己的ID,
    ToUserName: 自己的ID,
    ClientMsgId: 時(shí)間戳
    }

    返回?cái)?shù)據(jù)(JSON):

    {
        "BaseResponse": {
            "Ret": 0,
            "ErrMsg": ""
        },
        ...
    }

    7. 獲取聯(lián)系人列表(參考方法 getContact)

    APIwebwxgetcontact
    urlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxgetcontact
    methodPOST
    dataJSON
    headerContentType: application/json; charset=UTF-8
    params{
    BaseRequest: {
    Uin: xxx,
    Sid: xxx,
    Skey: xxx,
    DeviceID: xxx,
    }
    }

    返回?cái)?shù)據(jù)(JSON):

    {
        "BaseResponse": {
            "Ret": 0,
            "ErrMsg": ""
        },
        "MemberCount": 334,
        "MemberList": [
            {
                "Uin": 0,
                "UserName": xxx,
                "NickName": "Urinx",
                "HeadImgUrl": xxx,
                "ContactFlag": 3,
                "MemberCount": 0,
                "MemberList": [],
                "RemarkName": "",
                "HideInputBarFlag": 0,
                "Sex": 0,
                "Signature": "我是二蛋",
                "VerifyFlag": 8,
                "OwnerUin": 0,
                "PYInitial": "URINX",
                "PYQuanPin": "Urinx",
                "RemarkPYInitial": "",
                "RemarkPYQuanPin": "",
                "StarFriend": 0,
                "AppAccountFlag": 0,
                "Statues": 0,
                "AttrStatus": 0,
                "Province": "",
                "City": "",
                "Alias": "Urinxs",
                "SnsFlag": 0,
                "UniFriend": 0,
                "DisplayName": "",
                "ChatRoomId": 0,
                "KeyWord": "gh_",
                "EncryChatRoomId": ""
            },
            ...
        ],
        "Seq": 0
    }

    8.消息檢查(參考方法 syncCheck)

    APIsynccheck
    urlwebpush2.weixin.qq.com/cgi-bin/mmwebwx-bin/synccheck
    methodGET
    dataJSON
    headerContentType: application/json; charset=UTF-8
    params{
    BaseRequest: {
    Uin: xxx,
    Sid: xxx,
    Skey: xxx,
    DeviceID: xxx,
    }
    }

    返回?cái)?shù)據(jù)(String):

    window.synccheck={retcode:"xxx",selector:"xxx"}
    
    retcode:
        0 正常
        1100 失敗/登出微信
    selector:
        0 正常
        2 新的消息
        7 進(jìn)入/離開聊天界面

    9. 獲取最新消息(參考方法 webwxsync)

    APIwebwxsync
    urlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=xxx&skey=xxx&pass_ticket=xxx
    methodPOST
    dataJSON
    headerContentType: application/json; charset=UTF-8
    params{
    BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx },
    SyncKey: xxx,
    rr: 時(shí)間戳取反
    }

    返回?cái)?shù)據(jù)(JSON):

    {
        &#39;BaseResponse&#39;: {&#39;ErrMsg&#39;: &#39;&#39;, &#39;Ret&#39;: 0},
        &#39;SyncKey&#39;: {
            &#39;Count&#39;: 7,
            &#39;List&#39;: [
                {&#39;Val&#39;: 636214192, &#39;Key&#39;: 1},
                ...
            ]
        },
        &#39;ContinueFlag&#39;: 0,
        &#39;AddMsgCount&#39;: 1,
        &#39;AddMsgList&#39;: [
            {
                &#39;FromUserName&#39;: &#39;&#39;,
                &#39;PlayLength&#39;: 0,
                &#39;RecommendInfo&#39;: {...},
                &#39;Content&#39;: "", 
                &#39;StatusNotifyUserName&#39;: &#39;&#39;,
                &#39;StatusNotifyCode&#39;: 5,
                &#39;Status&#39;: 3,
                &#39;VoiceLength&#39;: 0,
                &#39;ToUserName&#39;: &#39;&#39;,
                &#39;ForwardFlag&#39;: 0,
                &#39;AppMsgType&#39;: 0,
                &#39;AppInfo&#39;: {&#39;Type&#39;: 0, &#39;AppID&#39;: &#39;&#39;},
                &#39;Url&#39;: &#39;&#39;,
                &#39;ImgStatus&#39;: 1,
                &#39;MsgType&#39;: 51,
                &#39;ImgHeight&#39;: 0,
                &#39;MediaId&#39;: &#39;&#39;, 
                &#39;FileName&#39;: &#39;&#39;,
                &#39;FileSize&#39;: &#39;&#39;,
                ...
            },
            ...
        ],
        &#39;ModChatRoomMemberCount&#39;: 0,
        &#39;ModContactList&#39;: [],
        &#39;DelContactList&#39;: [],
        &#39;ModChatRoomMemberList&#39;: [],
        &#39;DelContactCount&#39;: 0,
        ...
    }

    10. 發(fā)送消息(參考方法 webwxsendmsg)

    APIwebwxsendmsg
    urlwx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?pass_ticket=xxx
    methodPOST
    dataJSON
    headerContentType: application/json; charset=UTF-8
    params{
    BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx },
    Msg: {
    Type: 1 文字消息,
    Content: 要發(fā)送的消息,
    FromUserName: 自己的ID,
    ToUserName: 好友的ID,
    LocalID: 與clientMsgId相同,
    ClientMsgId: 時(shí)間戳左移4位隨后補(bǔ)上4位隨機(jī)數(shù)
    }
    }

    返回?cái)?shù)據(jù)(JSON):

    {
        "BaseResponse": {
            "Ret": 0,
            "ErrMsg": ""
        },
        ...
    }

    更多資料:
    github.com/xiangzhai/qwx
    github.com/Urinx/WeixinBot
    www.07net01.com/2016/01/1201188.html
    www.cnblogs.com/xiaozhi_5638/p/4923811.html

    【相關(guān)推薦】

    1. 微信公眾號源碼下載

    2. 阿貍子訂單系統(tǒng)源碼下載

    The above is the detailed content of Detailed explanation of WeChat protocol. For more information, please follow other related articles on the PHP Chinese website!

    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

    Hot AI Tools

    Undress AI Tool

    Undress AI Tool

    Undress images for free

    Undresser.AI Undress

    Undresser.AI Undress

    AI-powered app for creating realistic nude photos

    AI Clothes Remover

    AI Clothes Remover

    Online AI tool for removing clothes from photos.

    Clothoff.io

    Clothoff.io

    AI clothes remover

    Video Face Swap

    Video Face Swap

    Swap faces in any video effortlessly with our completely free AI face swap tool!

    Hot Tools

    Notepad++7.3.1

    Notepad++7.3.1

    Easy-to-use and free code editor

    SublimeText3 Chinese version

    SublimeText3 Chinese version

    Chinese version, very easy to use

    Zend Studio 13.0.1

    Zend Studio 13.0.1

    Powerful PHP integrated development environment

    Dreamweaver CS6

    Dreamweaver CS6

    Visual web development tools

    SublimeText3 Mac version

    SublimeText3 Mac version

    God-level code editing software (SublimeText3)

    Hot Topics

    PHP Tutorial
    1502
    276
    TikTok web version entrance login link address https TikTok web version entrance website free TikTok web version entrance login link address https TikTok web version entrance website free May 22, 2025 pm 04:24 PM

    The login portal for the Douyin web version is https://www.douyin.com/. The login steps include: 1. Open the browser; 2. Enter the URL https://www.douyin.com/; 3. Click the "Login" button and select the login method; 4. Enter the account password; 5. Complete login. The web version provides functions such as browsing, searching, interaction, uploading videos and personal homepage management, and has advantages such as large-screen experience, multi-tasking, convenient account management and data statistics.

    Copy comics (official website entrance)_Copy comics (nba) genuine online reading portal Copy comics (official website entrance)_Copy comics (nba) genuine online reading portal Jun 05, 2025 pm 04:12 PM

    Copying comics is undoubtedly a treasure that cannot be missed. Here you can find basketball comics in various styles, from passionate and inspiring competitive stories to relaxed and humorous daily comedy. Whether you want to relive the classics or discover new works, copying comics can meet your needs. Through the authentic online reading portal provided by copy comics, you will bid farewell to the trouble of pirated resources, enjoy a high-definition and smooth reading experience, and can support your favorite comic authors and contribute to the development of authentic comics.

    Which is better, uc browser or qq browser? In-depth comparison and evaluation of uc and qq browsers Which is better, uc browser or qq browser? In-depth comparison and evaluation of uc and qq browsers May 22, 2025 pm 08:33 PM

    Choosing UC browser or QQ browser depends on your needs: 1. UC browser is suitable for users who pursue fast loading and rich entertainment functions; 2. QQ browser is suitable for users who need stability and seamless connection with Tencent products.

    Top 10 AI writing software rankings Recommended Which AI writing software is free Top 10 AI writing software rankings Recommended Which AI writing software is free Jun 04, 2025 pm 03:27 PM

    Combining the latest industry trends and multi-dimensional evaluation data in 2025, the following are the top ten comprehensive AI writing software recommendations, covering mainstream scenarios such as general creation, academic research, and commercial marketing, while taking into account Chinese optimization and localization services:

    Watch the official page of NIS comics online for free comics. The free entry website of NIS comics login page Watch the official page of NIS comics online for free comics. The free entry website of NIS comics login page Jun 12, 2025 pm 08:18 PM

    Nice Comics, an immersive reading experience platform dedicated to creating for comic lovers, brings together a large number of high-quality comic resources at home and abroad. It is not only a comic reading platform, but also a community that connects comic artists and readers and shares comic culture. Through simple and intuitive interface design and powerful search functions, NES Comics allows you to easily find your favorite works and enjoy a smooth and comfortable reading experience. Say goodbye to the long waiting and tedious operations, enter the world of Nice comics immediately and start your comic journey!

    Frog Man Online Viewing Entrance Man Frog Man (Web Page Entrance) Watch Online Frog Man Online Viewing Entrance Man Frog Man (Web Page Entrance) Watch Online Jun 12, 2025 pm 08:06 PM

    Frogman Comics has become the first choice for many comic lovers with its rich and diverse comic resources and convenient and smooth online reading experience. It is like a vibrant pond, with fresh and interesting stories constantly emerging, waiting for you to discover and explore. Frog Man comics cover a variety of subjects, from passionate adventures to sweet love, from fantasy and science fiction to suspense reasoning, no matter which genre you like, you can find your favorite works here. Its simple and intuitive interface design allows you to easily get started, quickly find the comics you want to read, and immerse yourself in the exciting comic world.

    Baozi Comics (Entrance)_ Baozi Comics (New Entrance) 2025 Baozi Comics (Entrance)_ Baozi Comics (New Entrance) 2025 Jun 05, 2025 pm 04:18 PM

    Here, you can enjoy the vast ocean of comics and explore works of various themes and styles, from passionate young man comics to delicate and moving girl comics, from suspenseful and brain-burning mystery comics to relaxed and funny daily comics, there is everything, and there is always one that can touch your heartstrings. We not only have a large amount of genuine comic resources, but also constantly introduce and update the latest works to ensure that you can read your favorite comics as soon as possible.

    b An latest registered address_How to register b An exchange b An latest registered address_How to register b An exchange May 26, 2025 pm 07:12 PM

    The latest official website of 2025b Announce is: https://www.marketwebb.co/zh-CN/join?ref=507720986&amp;type=wenzi; Binance Exchange is a global cryptocurrency exchange that serves 180 countries and regions including North America, Europe, Taiwan, the Middle East, Hong Kong, and Malaysia. It provides more than 600 cryptocurrencies and has 270 million registered users worldwide.

    See all articles
    <span id="kvbyb"><optgroup id="kvbyb"></optgroup></span><span id="kvbyb"></span>
    <label id="kvbyb"><meter id="kvbyb"></meter></label>
    <li id="kvbyb"><legend id="kvbyb"></legend></li>

    <span id="kvbyb"></span>

    <label id="kvbyb"><meter id="kvbyb"><ruby id="kvbyb"></ruby></meter></label>
      <thead id="kvbyb"></thead>
      <span id="kvbyb"></span>