- 文档必读
- 个人微信
- 个人微信(DLL) 支持http+tcp
- 企业微信(开发中)
- 更新日志
- 插件敏感词审核机制
收到小程序消息事件
POST
http://callbackurl
请求参数
Body 参数application/json
event
enum<string>
事件类型
枚举值:
20009
description
string
事件描述
示例值:
小程序消息事件
time
integer
毫秒时间戳
示例值:
1726826627676
data
object
数据体
instanceId
string
实例id
示例值:
97554f7c82a1439c86df3143ef4975c5
robotId
string
必需
sendTime
integer
接收到消息的时间
示例值:
1726826627676
localId
string
本地消息id
示例值:
7053704521966022857
serverId
string
服务器消息id
messageType
integer
0
示例值:
103
cdnData
object
必需
cdnType
integer
必需
默认值:
2
appIcon
string
头像
示例值:
http://mmbiz.qpic.cn/mmbiz_png/xMiafHYLl3Ia3aLibcm6PiboWlzpnGdBU7MfUGAiaYMxIov13MLticBeQfcwyIicERqrpyg6Adp4SIOl2uLKq2ehHgrA/640?wx_fmt=png&wxfrom=200
appId
string
必需
示例值:
wx696a42df4f2456d3
appInfo
string
appInfo
示例值:
2759567329763469786
appName
string
必需
示例值:
喜茶GO
pagePath
string
必需
示例值:
pages/home/home.html
thumbHeight
integer
必需
示例值:
576
thumbWidth
integer
必需
示例值:
720
title
string
必需
示例值:
下单免排队,外卖送上门
username
string
小程序id
示例值:
gh_afe6acb517f0@app
messageSource
integer
必需
1消息为自己发送
conversationId
string
会话Id
fromWxId
string
好友wxid
示例值:
test
toWxId
string
messageSource=0时生效,发送给对方的wxid
fromNickName
string
好友昵称
示例值:
好友昵称
isPc
integer
0
示例
{
"event": "20009",
"description": "小程序消息事件",
"time": 1726826627676,
"data": {
"instanceId": "97554f7c82a1439c86df3143ef4975c5",
"robotId": "string",
"sendTime": 1726826627676,
"localId": "7053704521966022857",
"serverId": "string",
"messageType": 103,
"cdnData": {
"aes_key": "646B686A656F6C7569707A6E70717564",
"file_id": "306c020102046530630201000204df66563c02031e903802047ac7f46d0204674538990435333734383032353931365f3439323532373038345f36383634366230626230353634386665303766663938313334336163343365380203102000020300e68004000201010201000400",
"size": 58992
},
"cdnType": 2,
"appIcon": "http://mmbiz.qpic.cn/mmbiz_png/xMiafHYLl3Ia3aLibcm6PiboWlzpnGdBU7MfUGAiaYMxIov13MLticBeQfcwyIicERqrpyg6Adp4SIOl2uLKq2ehHgrA/640?wx_fmt=png&wxfrom=200",
"appId": "wx696a42df4f2456d3",
"appInfo": "2759567329763469786",
"appName": "喜茶GO",
"pagePath": "pages/home/home.html",
"thumbHeight": 576,
"thumbWidth": 720,
"title": "下单免排队,外卖送上门",
"username": "gh_afe6acb517f0@app",
"messageSource": 0,
"conversationId": "string",
"fromWxId": "test",
"toWxId": "string",
"fromNickName": "好友昵称",
"isPc": 0
}
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://callbackurl' \
--header 'Content-Type: application/json' \
--data-raw ''
返回响应
🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-11-26 06:47:08