xxx API接口文档
本文档由 Tester 自动生成,最后修改时间 2020-09-04 09:48:11
一、接口说明
普通文本消息发送接口
二、请求方式
POST https://api.bbbug.com/api/message/send
三、请求参数
字段 | 类型 | 必填 | 示例 | 说明 |
---|---|---|---|---|
access_token | string | 是 | 123456 | - |
plat | string | 是 | pc | - |
version | number | 是 | 10000 | - |
where | string | 是 | channel | 固定channel |
to | number | 是 | 888 | 发送的房间 |
type | string | 是 | text | 固定为text |
at | object | 是 | {} | @对象 不@请给null |
at.user_id | number | 否 | 10000 | @的ID |
at.user_name | string | 否 | Hamm | @的昵称 |
msg | string | 是 | %E6%B5%8B%E8%AF%95 | urlencode后的消息 |
示例JSON:
{
"access_token": "123456",
"plat": "pc",
"version": 10000,
"where": "channel",
"to": 888,
"type": "text",
"at": {
"user_id": 10000,
"user_name": "Hamm"
},
"msg": "%E6%B5%8B%E8%AF%95"
}
四、更多参数
Headers:
Content-Type:application/json;
五、返回数据
字段 | 类型 | 固定 | 示例值 | 说明 |
---|---|---|---|---|
code | number | 是 | 200 | - |
msg | string | 是 | success | - |
示例返回结果:
{
"code": 200,
"msg": "success"
}
六、测试用例
https://tester.hamm.cn/#/20200904/feea9dd7e432becad6ffd3894008b34ec6a6b7bc