发送私聊文件
POST
/send_private_msg
请求参数
Body 参数application/json
user_id
user_id
One of
message
array[object (文件消息) {2}]
必需
type
enum<string>
必需
枚举值:
file
data
object
必需
示例
{
"user_id": "123456",
"message": [
{
"type": "file",
"data": {
// 本地路径
"file": "file://D:/a.jpg"
// 网络路径
// "file": "http://i0.hdslb.com/bfs/archive/c8fd97a40bf79f03e7b76cbc87236f612caef7b2.png"
//base64编码
// "file": "base64://xxxxxxxx"
}
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST '/send_private_msg' \
--header 'Content-Type: application/json' \
--data-raw '{
"user_id": "123456",
"message": [
{
"type": "file",
"data": {
// 本地路径
"file": "file://D:/a.jpg"
// 网络路径
// "file": "http://i0.hdslb.com/bfs/archive/c8fd97a40bf79f03e7b76cbc87236f612caef7b2.png"
//base64编码
// "file": "base64://xxxxxxxx"
}
}
]
}'
返回响应
🟢200成功
application/json
Body
status
enum<string>
必需
枚举值:
ok
retcode
number
必需
data
object
必需
message_id
number
消息ID
message
string
必需
wording
string
必需
echo
string | null
必需
示例
{
"status": "ok",
"retcode": 0,
"data": {
"message_id": 696124706
},
"message": "",
"wording": ""
}
修改于 2025-03-28 13:20:45