Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 1.01 KB

message.create.md

File metadata and controls

52 lines (41 loc) · 1.01 KB

message.create

发送一条消息到指定聊天会话。

请求方式

POST {base_url}/message.create

请求参数

需要登录

参数名称 参数类型 参数是否必须? 说明 样例
vchannel_id string 指定的目标聊天会话 id =bw52O
text string 消息内容 中午吃啥啊?
attachments array 消息附件 中午吃啥啊?

响应

201

{
  "key": "1485236262366.0193",
  "updated": "2017-01-24T13:37:42.000+0000",
  "is_channel": false,
  "uid": "=bw52O",
  "fallback": null,
  "attachments": [],
  "created": "2017-01-24T13:37:42.000+0000",
  "vchannel_id": "=bw52O",
  "refer_key": null,
  "robot_id": null,
  "created_ts": 1485236262366,
  "team_id": "=bw52O",
  "subtype": "normal",
  "text": "hello"
}

错误响应

{
  "code": // error code,
  "error": "unexpected error"
}