- 基础API
- 登录模块
- 联系人模块
- 群模块
- 消息模块
- 标签模块
- 个人模块
- 收藏夹模块
- 账号管理
发送小程序消息
POST
/message/postMiniApp
请求参数
Header 参数
X-GEWE-TOKEN
string
必需
示例值:
{{gewe-token}}
Body 参数application/json
appId
string
设备ID
toWxid
string
好友/群的ID
miniAppId
string
小程序ID
displayName
string
小程序名称
pagePath
string
小程序打开的地址
coverImgUrl
string
小程序封面图链接
title
string
小程序标题
userName
string
归属的用户ID
示例
{
"appId": "{{appid}}",
"toWxid": "34757816141@chatroom",
"miniAppId": "wx1f9ea355b47256dd",
"userName": "gh_690acf47ea05@app",
"title": "最快29分钟 好吃水果送到家",
"coverImgUrl": "https://che-static.vzhimeng.com/img/2023/10/30/67d55942-e43c-4fdb-8396-506794ddbdbc.jpg",
"pagePath": "pages/homeDelivery/index.html",
"displayName": "百果园+"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/message/postMiniApp' \
--header 'X-GEWE-TOKEN: {{gewe-token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"appId": "{{appid}}",
"toWxid": "34757816141@chatroom",
"miniAppId": "wx1f9ea355b47256dd",
"userName": "gh_690acf47ea05@app",
"title": "最快29分钟 好吃水果送到家",
"coverImgUrl": "https://che-static.vzhimeng.com/img/2023/10/30/67d55942-e43c-4fdb-8396-506794ddbdbc.jpg",
"pagePath": "pages/homeDelivery/index.html",
"displayName": "百果园+"
}'
返回响应
🟢200成功
application/json
Body
ret
integer
必需
msg
string
必需
data
object
必需
toWxid
string
接收人的wxid
createTime
integer
发送时间
msgId
integer
消息ID
newMsgId
integer
消息ID
type
integer
消息类型
示例
{
"ret": 200,
"msg": "操作成功",
"data": {
"toWxid": "34757816141@chatroom",
"createTime": 1704162674,
"msgId": 769533691,
"newMsgId": 3190424380344821000,
"type": 33
}
}
修改于 2024-07-23 06:41:21