发送私聊自定义音乐卡片
POST
/send_private_msg
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
user_id
integer
必需
message
array [object {2}]
必需
type
enum<string>
必需
枚举值:
music
data
object
可选
示例
{
"user_id": 379450326,
"message": [
{
"type": "music",
"data": {
"type": "custom",
"url": "https://music.qq.com",
"audio": "http://192.168.1.5:8000/1.mp3",
"title": "花之歌?",
"image": "https://g.gtimg.cn/music/photo_new/T057XD001000ZH2Pm0IsyvJ.png"
}
}
]
}
示例代码
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": 379450326,
"message": [
{
"type": "music",
"data": {
"type": "custom",
"url": "https://music.qq.com",
"audio": "http://192.168.1.5:8000/1.mp3",
"title": "花之歌?",
"image": "https://g.gtimg.cn/music/photo_new/T057XD001000ZH2Pm0IsyvJ.png"
}
}
]
}'
返回响应
🟢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": ""
}
修改于 2024-10-24 02:39:34