Top Related Projects
微信机器人 / 可能是最优雅的微信个人号 API ✨✨
A complete and graceful API for Wechat. 微信个人号接口、微信机器人及 命令行微信,三十行即可自定义个人号机器人。
Conversational RPA SDK for Chatbot Makers. Join our Discord: https://discord.gg/7q8NBZbQzt
Mac微信功能拓展/微信插件/微信小助手(A plugin for Mac WeChat)
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Quick Overview
WeixinBot is a Python-based WeChat (Weixin) personal account API that allows users to automate interactions with WeChat. It provides functionality for logging in, sending messages, and managing contacts programmatically, enabling developers to create bots and automated scripts for WeChat.
Pros
- Offers programmatic access to WeChat features without using the official API
- Supports various WeChat functionalities like sending messages, managing contacts, and handling group chats
- Written in Python, making it accessible to a wide range of developers
- Includes a web-based interface for easier interaction and debugging
Cons
- May violate WeChat's terms of service, potentially leading to account suspension
- Relies on reverse-engineering WeChat's web interface, which could break with updates
- Limited documentation and may require some technical expertise to use effectively
- Not officially supported or endorsed by WeChat/Tencent
Code Examples
- Logging in to WeChat:
from wxbot import WXBot
bot = WXBot()
bot.run()
- Sending a message to a friend:
friend_username = 'example_username'
message = 'Hello from WeixinBot!'
bot.send_msg(friend_username, message)
- Handling incoming messages:
@bot.msg_register
def handle_msg(msg):
if msg['msg_type_id'] == 4 and msg['content']['type'] == 0:
bot.send_msg(msg['user']['id'], 'Thanks for your message!')
Getting Started
To get started with WeixinBot:
-
Clone the repository:
git clone https://github.com/Urinx/WeixinBot.git
-
Install dependencies:
pip install -r requirements.txt
-
Run the bot:
from wxbot import WXBot bot = WXBot() bot.run()
-
Scan the QR code with your WeChat mobile app to log in.
-
Start interacting with WeChat programmatically using the bot object.
Competitor Comparisons
微信机器人 / 可能是最优雅的微信个人号 API ✨✨
Pros of wxpy
- More actively maintained with recent updates
- Comprehensive documentation and examples
- Supports both WeChat Web and iPad protocols
Cons of wxpy
- Requires Python 3.4+, while WeixinBot supports Python 2.7
- May have a steeper learning curve for beginners
- Less focused on specific bot functionality, more of a general-purpose library
Code Comparison
WeixinBot:
@bot.register(['Friend', 'Group'])
def reply_text(msg):
return 'received: {} ({})'.format(msg.text, msg.type)
bot.join()
wxpy:
@bot.register()
def print_messages(msg):
print(msg)
embed()
Both libraries use decorators for message handling, but wxpy's approach is more flexible and allows for easier customization. WeixinBot's code is more specific to replying to messages, while wxpy's example demonstrates a general message printing function.
A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。
Pros of ItChat
- More actively maintained with regular updates
- Better documentation and examples for easier implementation
- Supports both personal and public WeChat accounts
Cons of ItChat
- Slightly more complex setup process
- May have slower performance for certain operations
- Limited customization options compared to WeixinBot
Code Comparison
WeixinBot:
def get_uuid(self):
url = 'https://login.weixin.qq.com/jslogin'
params = {
'appid': 'wx782c26e4c19acffb',
'fun': 'new',
'lang': 'zh_CN',
'_': int(time.time()),
}
ItChat:
def get_QRuuid(self):
url = '%s/jslogin' % LOGIN_TEMPLATE
params = {
'appid': 'wx782c26e4c19acffb',
'fun': 'new',
'lang': 'zh_CN',
'_': int(time.time() * 1000),
}
Both repositories provide similar functionality for interacting with WeChat, but ItChat offers a more user-friendly experience with better documentation and support for different account types. WeixinBot, on the other hand, may offer more flexibility for advanced users who want to customize their implementation. The code comparison shows that both projects use similar approaches for obtaining the QR code UUID, with minor differences in URL structure and timestamp formatting.
Conversational RPA SDK for Chatbot Makers. Join our Discord: https://discord.gg/7q8NBZbQzt
Pros of Wechaty
- Multi-platform support (Web, Pad, Mac, Windows, Linux)
- Extensive documentation and active community
- Supports multiple messaging protocols beyond just WeChat
Cons of Wechaty
- More complex setup and configuration
- Larger codebase and potentially steeper learning curve
- May require more resources to run
Code Comparison
WeixinBot:
def get_uuid(self):
url = 'https://login.weixin.qq.com/jslogin'
params = {
'appid': 'wx782c26e4c19acffb',
'fun': 'new',
'lang': 'zh_CN',
'_': int(time.time()),
}
Wechaty:
import { Wechaty } from 'wechaty'
const bot = new Wechaty()
bot.on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\nhttps://wechaty.js.org/qrcode/${encodeURIComponent(qrcode)}`))
bot.on('login', user => console.log(`User ${user} logged in`))
bot.start()
WeixinBot is a Python-based WeChat bot focused specifically on WeChat, offering a simpler setup but with limited features. Wechaty, on the other hand, is a more comprehensive JavaScript/TypeScript solution that supports multiple platforms and messaging protocols, providing greater flexibility but requiring more setup and resources. Wechaty's extensive documentation and active community make it more suitable for complex projects, while WeixinBot might be preferable for simpler, WeChat-specific applications.
Mac微信功能拓展/微信插件/微信小助手(A plugin for Mac WeChat)
Pros of WeChatExtension-ForMac
- More actively maintained with frequent updates
- Specifically designed for macOS, offering better integration
- Includes additional features like message recall prevention and auto-reply
Cons of WeChatExtension-ForMac
- Limited to macOS platform, reducing cross-platform compatibility
- Requires installation as a plugin, potentially more complex setup
- May be affected by WeChat updates more frequently due to its nature as an extension
Code Comparison
WeixinBot (Python):
def send_msg_by_uid(self, word, dst='filehelper'):
url = self.base_uri + '/webwxsendmsg?pass_ticket=%s' % self.pass_ticket
msg_id = str(int(time.time() * 1000)) + str(random.random())[:5].replace('.', '')
word = self.to_unicode(word)
params = {
'BaseRequest': self.base_request,
'Msg': {
"Type": 1,
"Content": word,
"FromUserName": self.my_account['UserName'],
"ToUserName": dst,
"LocalID": msg_id,
"ClientMsgId": msg_id
}
}
headers = {'content-type': 'application/json; charset=UTF-8'}
data = json.dumps(params, ensure_ascii=False).encode('utf8')
try:
r = self.session.post(url, data=data, headers=headers)
except (ConnectionError, ReadTimeout):
return False
dic = r.json()
return dic['BaseResponse']['Ret'] == 0
WeChatExtension-ForMac (Objective-C):
- (void)sendTextMessage:(NSString *)text toUsrName:(NSString *)userName
{
WeChat *wechat = [objc_getClass("WeChat") sharedInstance];
MMServiceCenter *serviceCenter = [wechat serviceCenter];
id msgService = [serviceCenter getService:objc_getClass("MMMessageService")];
WCContactData *contact = [msgService getContact:userName];
[msgService SendTextMessage:contact.m_nsUsrName toUsrName:contact.m_nsUsrName msgText:text atUserList:nil];
}
The code snippets show different approaches to sending messages, with WeixinBot using HTTP requests and WeChatExtension-ForMac utilizing WeChat's internal APIs.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Pros of chatgpt-on-wechat
- Integrates ChatGPT functionality directly into WeChat
- Supports multiple AI models, including GPT-3.5-turbo and GPT-4
- Offers more advanced features like image generation and voice message processing
Cons of chatgpt-on-wechat
- Requires OpenAI API key, which may incur costs
- More complex setup process due to additional dependencies
- Potential privacy concerns with sending messages to external AI services
Code Comparison
WeixinBot:
def handle_msg(self, r):
for msg in r['AddMsgList']:
print('[*] New message from %s: %s' % (msg['FromUserName'], msg['Content']))
chatgpt-on-wechat:
async def handle_message(self, msg: Message):
if msg.type == MessageType.TEXT:
await self.handle_text_message(msg)
elif msg.type == MessageType.VOICE:
await self.handle_voice_message(msg)
The code comparison shows that chatgpt-on-wechat has more sophisticated message handling, supporting different message types and using async functions for better performance. WeixinBot, on the other hand, has a simpler approach to message handling.
While WeixinBot focuses on basic WeChat bot functionality, chatgpt-on-wechat extends this by integrating AI capabilities. However, this comes at the cost of increased complexity and potential privacy concerns. The choice between the two depends on the specific requirements of the project and the level of AI integration needed.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
WeixinBot
ç½é¡µç微信APIï¼å å«ç»ç«¯ç微信å微信æºå¨äºº
Contents
Demo
为äºç¡®ä¿è½æ£å¸¸è¿è¡ç¤ºä¾èæ¬ï¼è¯·å®è£ æéç第ä¸æ¹å ã
pip install -r requirements.txt
注ï¼ä¸é¢æ¼ç¤ºçå¾çä¸åè½å¯è½ä¸æ¯ææ°çï¼å ·ä½è¯·çæºç ã
æç §æä½æ示å¨ææºå¾®ä¿¡ä¸æ«æäºç»´ç ç¶åç»å½ï¼ä½ å¯ä»¥éæ©æ¯å¦å¼å¯èªå¨åå¤æ¨¡å¼ã
å¼å¯èªå¨åå¤æ¨¡å¼åï¼å¦ææ¥æ¶å°çæ¯æåæ¶æ¯å°±ä¼èªå¨åå¤ï¼å æ¬ç¾¤æ¶æ¯ã
åçï¼é¾æ¥ï¼å¨ç»è¡¨æ åå°åä½ç½®æ¶æ¯ã
ç½é¡µçä¸æçåè½ç®ååºæ¬ä¸é½è½æ¯æã
Web Weixin Pipeline
+--------------+ +---------------+ +---------------+
| | | | | |
| 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|
+-------------+
Web Weixin API
ç»å½
API | è·å UUID |
---|---|
url | https://login.weixin.qq.com/jslogin |
method | POST |
data | URL Encode |
params | appid: åºç¨ID fun: new åºç¨ç±»å lang: zh_CN è¯è¨ _: æ¶é´æ³ |
è¿åæ°æ®(String):
window.QRLogin.code = 200; window.QRLogin.uuid = "xxx"
注ï¼è¿éçappidå°±æ¯å¨å¾®ä¿¡å¼æ¾å¹³å°æ³¨åçåºç¨çAppIDãç½é¡µç微信æ两个AppIDï¼æ©æçæ¯
wx782c26e4c19acffb
ï¼å¨å¾®ä¿¡å®¢æ·ç«¯ä¸æ¾ç¤ºä¸ºåºç¨å称为Web微信
ï¼ç°å¨ç¨çæ¯wxeb7ec651dd0aefa9
ï¼æ¾ç¤ºå称为微信ç½é¡µç
ã
API | ç»å®ç»éï¼webwxpushloginurlï¼ |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxpushloginurl |
method | GET |
params | uin: xxx |
è¿åæ°æ®(String):
{'msg': 'all ok', 'uuid': 'xxx', 'ret': '0'}
éè¿è¿ç§æ¹å¼å¯ä»¥çææ«äºç»´ç è¿æ¥æä½ï¼æ´å æ¹ä¾¿
API | çæäºç»´ç |
---|---|
url | https://login.weixin.qq.com/l/ uuid |
method | GET |
API | äºç»´ç æ«æç»å½ |
---|---|
url | https://login.weixin.qq.com/cgi-bin/mmwebwx-bin/login |
method | GET |
params | tip: 1 æªæ«æ 0 å·²æ«æ uuid: xxx _: æ¶é´æ³ |
è¿åæ°æ®(String):
window.code=xxx;
xxx:
408 ç»éè¶
æ¶
201 æ«ææå
200 确认ç»å½
å½è¿å200æ¶ï¼è¿ä¼æ
window.redirect_uri="https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage?ticket=xxx&uuid=xxx&lang=xxx&scan=xxx";
API | webwxnewloginpage |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxnewloginpage |
method | GET |
params | ticket: xxx uuid: xxx lang: zh_CN è¯è¨ scan: xxx fun: new |
è¿åæ°æ®(XML):
<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>
微信åå§å
API | webwxinit |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxinit?pass_ticket=xxx&skey=xxx&r=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx, } } |
è¿åæ°æ®(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
}
API | webwxstatusnotify |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxstatusnotify?lang=zh_CN&pass_ticket=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, Code: 3, FromUserName: èªå·±ID , ToUserName: èªå·±ID , ClientMsgId: æ¶é´æ³ } |
è¿åæ°æ®(JSON):
{
"BaseResponse": {
"Ret": 0,
"ErrMsg": ""
},
...
}
è·åè系人信æ¯
API | webwxgetcontact |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin//webwxgetcontact?pass_ticket=xxx&skey=xxx&r=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
è¿åæ°æ®(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": "ä½ å¥½ï¼æ们æ¯å°çä¸ä½ç»ç»ãå¨è¿éï¼ä½ å°æåå°ä¸ä¸æ ·çæ维模å¼ï¼ä»¥åé¢ è¦å¸¸è§çä¸çè§ãèæ们çç®æ ï¼å°±æ¯ä»¥ä¸ä½äººçæºæ
§ï¼å¼é¢äººç±»æªæ¥ç§å¦ææ¯500å¹´ã",
"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
}
API | webwxbatchgetcontact |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxbatchgetcontact?type=ex&r=xxx&pass_ticket=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, Count: 群æ°é , List: [ { UserName: 群ID , EncryChatRoomId: "" }, ... ], } |
è¿åæ°æ®(JSON)åä¸
åæ¥å·æ°
API | synccheck |
---|---|
protocol | https |
host | webpush.weixin.qq.com webpush.wx2.qq.com webpush.wx8.qq.com webpush.wx.qq.com webpush.web2.wechat.com webpush.web.wechat.com |
path | /cgi-bin/mmwebwx-bin/synccheck |
method | GET |
data | URL Encode |
params | r: æ¶é´æ³ sid: xxx uin: xxx skey: xxx deviceid: xxx synckey: xxx _: æ¶é´æ³ |
è¿åæ°æ®(String):
window.synccheck={retcode:"xxx",selector:"xxx"}
retcode:
0 æ£å¸¸
1100 失败/ç»åºå¾®ä¿¡
selector:
0 æ£å¸¸
2 æ°çæ¶æ¯
7 è¿å
¥/离å¼è天çé¢
API | webwxsync |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsync?sid=xxx&skey=xxx&pass_ticket=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, SyncKey: xxx, rr: æ¶é´æ³åå } |
è¿åæ°æ®(JSON):
{
'BaseResponse': {'ErrMsg': '', 'Ret': 0},
'SyncKey': {
'Count': 7,
'List': [
{'Val': 636214192, 'Key': 1},
...
]
},
'ContinueFlag': 0,
'AddMsgCount': 1,
'AddMsgList': [
{
'FromUserName': '',
'PlayLength': 0,
'RecommendInfo': {...},
'Content': "",
'StatusNotifyUserName': '',
'StatusNotifyCode': 5,
'Status': 3,
'VoiceLength': 0,
'ToUserName': '',
'ForwardFlag': 0,
'AppMsgType': 0,
'AppInfo': {'Type': 0, 'AppID': ''},
'Url': '',
'ImgStatus': 1,
'MsgType': 51,
'ImgHeight': 0,
'MediaId': '',
'FileName': '',
'FileSize': '',
...
},
...
],
'ModChatRoomMemberCount': 0,
'ModContactList': [],
'DelContactList': [],
'ModChatRoomMemberList': [],
'DelContactCount': 0,
...
}
æ¶æ¯æ¥å£
API | webwxsendmsg |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxsendmsg?pass_ticket=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, Msg: { Type: 1 æåæ¶æ¯ , Content: è¦åéçæ¶æ¯ , FromUserName: èªå·±ID , ToUserName: 好åID , LocalID: ä¸clientMsgIdç¸å , ClientMsgId: æ¶é´æ³å·¦ç§»4ä½éåè¡¥ä¸4ä½éæºæ° } } |
è¿åæ°æ®(JSON):
{
"BaseResponse": {
"Ret": 0,
"ErrMsg": ""
},
...
}
API | webwxrevokemsg |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxrevokemsg |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, SvrMsgId: msg_id, ToUserName: user_id, ClientMsgId: local_msg_id } |
è¿åæ°æ®(JSON):
{
"BaseResponse": {
"Ret": 0,
"ErrMsg": ""
}
}
åé表æ
API | webwxsendmsgemotion |
---|---|
url | https://wx2.qq.com/cgi-bin/mmwebwx-bin/webwxsendemoticon?fun=sys&f=json&pass_ticket=xxx |
method | POST |
data | JSON |
header | ContentType: application/json; charset=UTF-8 |
params | { BaseRequest: { Uin: xxx, Sid: xxx, Skey: xxx, DeviceID: xxx }, Msg: { Type: 47 emojiæ¶æ¯ , EmojiFlag: 2, MediaId: 表æ
ä¸ä¼ åçåªä½ID , FromUserName: èªå·±ID , ToUserName: 好åID , LocalID: ä¸clientMsgIdç¸å , ClientMsgId: æ¶é´æ³å·¦ç§»4ä½éåè¡¥ä¸4ä½éæºæ° } } |
å¾çæ¥å£
API | webwxgeticon |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgeticon |
method | GET |
params | seq: æ°åï¼å¯ä¸ºç©º username: ID skey: xxx |
API | webwxgetheadimg |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetheadimg |
method | GET |
params | seq: æ°åï¼å¯ä¸ºç©º username: 群ID skey: xxx |
API | webwxgetmsgimg |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetmsgimg |
method | GET |
params | MsgID: æ¶æ¯ID type: slave ç¥ç¼©å¾ or 为空æ¶å è½½åå¾ skey: xxx |
å¤åªä½æ¥å£
API | webwxgetvideo |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvideo |
method | GET |
params | msgid: æ¶æ¯ID skey: xxx |
API | webwxgetvoice |
---|---|
url | https://wx.qq.com/cgi-bin/mmwebwx-bin/webwxgetvoice |
method | GET |
params | msgid: æ¶æ¯ID skey: xxx |
è´¦å·ç±»å
ç±»å | 说æ |
---|---|
ä¸ªäººè´¦å· | 以@ å¼å¤´ï¼ä¾å¦ï¼@xxx |
群è | 以@@ å¼å¤´ï¼ä¾å¦ï¼@@xxx |
å ¬ä¼å·/æå¡å· | 以@ å¼å¤´ï¼ä½å
¶VerifyFlag & 8 != 0 VerifyFlag : ä¸è¬ä¸ªäººå ¬ä¼å·/æå¡å·ï¼8 ä¸è¬ä¼ä¸çæå¡å·ï¼24 微信å®æ¹è´¦å· 微信å¢é ï¼56 |
ç¹æ®è´¦å· | åæä»¶ä¼ è¾å©æä¹ç±»çè´¦å·ï¼æç¹æ®çIDï¼ç®åå·²ç¥çæï¼filehelper , newsapp , fmessage , weibo , qqmail , 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 |
æ¶æ¯ç±»å
æ¶æ¯ä¸è¬æ ¼å¼ï¼
{
"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 | 好å确认æ¶æ¯ |
40 | POSSIBLEFRIEND_MSG |
42 | å ±äº«åç |
43 | è§é¢æ¶æ¯ |
47 | å¨ç»è¡¨æ |
48 | ä½ç½®æ¶æ¯ |
49 | å享é¾æ¥ |
50 | VOIPMSG |
51 | 微信åå§åæ¶æ¯ |
52 | VOIPNOTIFY |
53 | VOIPINVITE |
62 | å°è§é¢ |
9999 | SYSNOTICE |
10000 | ç³»ç»æ¶æ¯ |
10002 | æ¤åæ¶æ¯ |
微信åå§åæ¶æ¯
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>
ææ¬æ¶æ¯
MsgType: 1
FromUserName: åéæ¹ID
ToUserName: æ¥æ¶æ¹ID
Content: æ¶æ¯å
容
å¾çæ¶æ¯
MsgType: 3
FromUserName: åéæ¹ID
ToUserName: æ¥æ¶æ¹ID
MsgId: ç¨äºè·åå¾ç
Content:
<msg>
<img length="6503" hdlength="0" />
<commenturl></commenturl>
</msg>
å°è§é¢æ¶æ¯
MsgType: 62
FromUserName: åéæ¹ID
ToUserName: æ¥æ¶æ¹ID
MsgId: ç¨äºè·åå°è§é¢
Content:
<msg>
<img length="6503" hdlength="0" />
<commenturl></commenturl>
</msg>
å°çä½ç½®æ¶æ¯
MsgType: 1
FromUserName: åéæ¹ID
ToUserName: æ¥æ¶æ¹ID
Content: http://weixin.qq.com/cgi-bin/redirectforward?args=xxx
// å±äºææ¬æ¶æ¯ï¼åªä¸è¿å
容æ¯ä¸ä¸ªè·³è½¬å°å°å¾çé¾æ¥
åçæ¶æ¯
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
}
è¯é³æ¶æ¯
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>
å¨ç»è¡¨æ
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>
æ®éé¾æ¥æåºç¨å享æ¶æ¯
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>
é³ä¹é¾æ¥æ¶æ¯
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&guid=ffffffffc104ea2964a111cf3ff3edaf&fromtag=46
</dataurl>
<lowdataurl>
http://ws.stream.qqmusic.qq.com/C100003i9hMt1bgui0.m4a?vkey=6867EF99F3684&guid=ffffffffc104ea2964a111cf3ff3edaf&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>
群æ¶æ¯
MsgType: 1
FromUserName: @@xxx
ToUserName: @xxx
Content:
@xxx:<br/>xxx
红å æ¶æ¯
MsgType: 49
AppMsgType: 2001
FromUserName: åéæ¹ID
ToUserName: æ¥æ¶æ¹ID
Content: æªç¥
注ï¼æ ¹æ®ç½é¡µçç代ç å¯ä»¥çå°æªæ¥å¯è½æ¯ææ¥ç红å æ¶æ¯ï¼ä½ç®åèµ°çæ¯ç³»ç»æ¶æ¯ï¼è§ä¸ã
ç³»ç»æ¶æ¯
MsgType: 10000
FromUserName: åéæ¹ID
ToUserName: èªå·±ID
Content:
"ä½ å·²æ·»å äº xxx ï¼ç°å¨å¯ä»¥å¼å§è天äºã"
"å¦æéç人主å¨æ·»å ä½ ä¸ºæåï¼è¯·è°¨æ
æ ¸å®å¯¹æ¹èº«ä»½ã"
"æ¶å°çº¢å
ï¼è¯·å¨ææºä¸æ¥ç"
Discussion Group
å¦æä½ å¸æå WeixinBot çå ¶ä»å¼åè 交æµï¼æè æä»ä¹é®é¢å建议ï¼æ¬¢è¿å¤§å®¶å å ¥å¾®ä¿¡ç¾¤ãYouth fed the dogãä¸èµ·è®¨è®ºãæ«æä¸é¢çäºç»´ç æ·»å æºå¨äººä¸ºå¥½åï¼å¹¶åå¤ãAidogãè·åå ¥ç¾¤é¾æ¥ã
注ï¼è¿ä¸ªä¸æ¯ç¾¤çäºç»´ç ï¼æ¯æºå¨äººæä½ å ¥ç¾¤ï¼è®°å¾åå¤æºå¨äººãAidogãå¦~ ï¼secret code: Aidogï¼
Recent Update
- association_login ç®åç½é¡µç微信已ç»å¯ä»¥è±ç¦»æ«ç ï¼ä½æ¯ä¾ç¶éè¦å¨å®¢æ·ç«¯è¿è¡ç¡®è®¤ç»å½ã
Top Related Projects
微信机器人 / 可能是最优雅的微信个人号 API ✨✨
A complete and graceful API for Wechat. 微信个人号接口、微信机器人及命令行微信,三十行即可自定义个人号机器人。
Conversational RPA SDK for Chatbot Makers. Join our Discord: https://discord.gg/7q8NBZbQzt
Mac微信功能拓展/微信插件/微信小助手(A plugin for Mac WeChat)
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语 音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot