推送消息 #
功能 #
推送消息接口,支持推送文本和图片消息。
接口地址 #
/message/{chatToken}
参数说明 #
参数 | 类型 | 必须 | 说明 |
---|---|---|---|
text | String | 是 | 文字内容(当 photo 存在时可为空) |
photo | String | 否 | 图片文件或者图片外链 |
parseMode | String | 否 | 发送文字内容的样式,可以是 Markdown 或 HTML |
使用示例 #
bash
# using get
# 推送消息
curl -X GET https://pushbot.dev/message/{chatToken}?text=HelloWorld
# 推送图片
curl -X GET https://pushbot.dev/message/{chtToken}?photo=https://xxx.com/xxxxx.jpg
# using post
# 推送消息
curl -d '{"text":"HelloWorld"}' -X POST https://pushbot.dev/message/{chatToken}
# 推送图片
curl -d '{"photo":"https://xxx.com/xxxxx.jpg"}' -X POST https://pushbot.dev/message/{chatToken}