发送私聊卡片(json)消息
POST
/send_private_msg
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
user_id
string
必需
message
array [object {2}]
必需
type
enum<string>
必需
枚举值:
text
data
object
必需
示例
{
"user_id": 370450326,
"message": [
{
"type": "json",
"data": {
"data": "{ \"app\": \"com.tencent.music.lua\", \"bizsrc\": \"qqconnect.sdkshare_music\", \"config\": { \"ctime\": 1736390927, \"forward\": 1, \"token\": \"9c72f3a00a1587f4b88eb91303c2a96c\", \"type\": \"normal\" }, \"extra\": { \"app_type\": 1, \"appid\": 100497308, \"uin\": 3264925726 }, \"meta\": { \"music\": { \"app_type\": 1, \"appid\": 100497308, \"ctime\": 1736390927, \"desc\": \" \", \"jumpUrl\": \"https://mc.kurogames.com/m/\", \"musicUrl\": \"https://mc.kurogames.com/m/\", \"preview\": \"https://qq.ugcimg.cn/v1/dp7ec71e9hd5vdmmsv5ot2c9njd2i4n3i25oads477jcpi12h1brjrbrpum1clevmsp9tf77m0bmnd71f4r8jl9t7fntrmaefdah5jo/v697fvf8debh0gec94kh0e8u17c0jlfn8r7f6meo1lslp954nr0g\", \"tag\": \"QQ音乐\", \"tagIcon\": \"https://p.qpic.cn/qqconnect/0/app_100497308_1626060999/100?max-age=2592000&t=0\", \"title\": \"LLOneBot启动!\", \"uin\": 3264925726 } }, \"prompt\": \"[分享]LLOneBot启动!\", \"ver\": \"0.0.0.1\", \"view\": \"music\"}"
}
}
]
}
示例代码
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://localhost:3000/send_private_msg' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_id": 370450326,
"message": [
{
"type": "json",
"data": {
"data": "{ \"app\": \"com.tencent.music.lua\", \"bizsrc\": \"qqconnect.sdkshare_music\", \"config\": { \"ctime\": 1736390927, \"forward\": 1, \"token\": \"9c72f3a00a1587f4b88eb91303c2a96c\", \"type\": \"normal\" }, \"extra\": { \"app_type\": 1, \"appid\": 100497308, \"uin\": 3264925726 }, \"meta\": { \"music\": { \"app_type\": 1, \"appid\": 100497308, \"ctime\": 1736390927, \"desc\": \" \", \"jumpUrl\": \"https://mc.kurogames.com/m/\", \"musicUrl\": \"https://mc.kurogames.com/m/\", \"preview\": \"https://qq.ugcimg.cn/v1/dp7ec71e9hd5vdmmsv5ot2c9njd2i4n3i25oads477jcpi12h1brjrbrpum1clevmsp9tf77m0bmnd71f4r8jl9t7fntrmaefdah5jo/v697fvf8debh0gec94kh0e8u17c0jlfn8r7f6meo1lslp954nr0g\", \"tag\": \"QQ音乐\", \"tagIcon\": \"https://p.qpic.cn/qqconnect/0/app_100497308_1626060999/100?max-age=2592000&t=0\", \"title\": \"LLOneBot启动!\", \"uin\": 3264925726 } }, \"prompt\": \"[分享]LLOneBot启动!\", \"ver\": \"0.0.0.1\", \"view\": \"music\"}"
}
}
]
}'
返回响应
🟢200成功
application/json
Body
status
string
必需
retcode
integer
必需
data
object
必需
message_id
integer
必需
message
string
必需
wording
string
必需
示例
{
"status": "ok",
"retcode": 0,
"data": {
"message_id": 696124706
},
"message": "",
"wording": ""
}
修改于 2025-01-09 02:55:38