在线机器人机器人会话
企业微信机器人转人工
企业微信机器人转人工。
请求字段限制:
- robotId:必填,机器人 ID
- groupId:必填,转人工分组 ID
- wxWorkCorpId:必填,企业微信企业 ID
- wxWorkAgentId:必填,企业微信 AgentId
- fromAccount:必填,访客企业微信 ID
请求参数
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| appKey | string | 是 | 应用 AppKey | 1c088a89de51d0af457616605f28390f |
| time | int64 | 是 | 请求时间戳(秒);与服务器时间误差超过 10 分钟会鉴权失败 | 1511832531 |
| checksum | string | 是 | 请求签名校验和 | f570a5eb049eb803b086e45829b07e48 |
| checksumAlgorithm | int32 | 否 | 签名算法:0-SHA-1,1-SHA-256;不传默认为 0(SHA-1) | 0 |
请求体
| 名称 | 类型 | 必填 | 描述 | 示例值 |
|---|---|---|---|---|
| robotId | int64 | 是 | 机器人 ID | 123456 |
| groupId | int64 | 是 | 转人工分组 ID | 8888 |
| wxWorkCorpId | string | 是 | 企业微信企业 ID | ww123456 |
| wxWorkAgentId | string | 是 | 企业微信 AgentId | 1000001 |
| fromAccount | string | 是 | 访客企业微信 ID | zhangsan |
返回参数
| 名称 | 类型 | 描述 | 示例值 |
|---|---|---|---|
| code | int32 | 业务状态码,200 表示成功 | 200 |
| message | string | 响应消息 | success |
| data | boolean | ||
| total | int32 | 分页总数,分页接口返回 | 100 |
| requestId | string | 链路请求 ID | 0a1b2c3d4e5f |
| result | object | 部分历史接口使用 result 字段承载业务数据 |
错误码
| 状态码 | 描述 |
|---|---|
| 14001 | AppKey 缺失或不存在 |
| 14002 | checksum 校验失败 |
| 14003 | 请求时间戳与服务器时间误差超过 10 分钟 |
| 14004 | 请求体不是合法 JSON 对象,或参数缺失、格式非法 |
| 14009 | 频控限制:接口调用超过限流阈值 |
| 14500 | 服务内部错误 |
| 14501 | 数据查询范围超出限制 |
| 14515 | 当前 AppKey 无接口或资源访问权限 |
postEndpoint
/openapi/robot/session/wxWork/transfercurl -X POST "https://qiyukf.com/openapi/robot/session/wxWork/transfer?appKey=1c088a89de51d0af457616605f28390f&time=1511832531&checksum=f570a5eb049eb803b086e45829b07e48" \ -H "Content-Type: application/json" \ -d '{ "groupId": 8888, "wxWorkCorpId": "ww123456", "fromAccount": "zhangsan", "robotId": 123456, "wxWorkAgentId": "1000001" }'{
"code": 200,
"data": {},
"message": "success"
}{
"code": 14001,
"message": "AppKey not exists"
}{
"code": 14002,
"message": "Bad checksum"
}{
"code": 14003,
"message": "Bad time"
}{
"code": 14004,
"message": "body内容json解析错误"
}{
"code": 14009,
"message": "单位时间内请求过于频繁"
}{
"code": 14500,
"message": "Internal error"
}{
"code": 14501,
"message": "Data limit exceeded"
}{
"code": 14515,
"message": "未开通机器人服务"
}这篇文档有帮助吗?
上传会话文件
上传会话文件。 请求字段限制: - file:选填,上传文件内容
新增知识
新增知识。 接口级参数规则:新增时 name、answer、categoryId、robotId 必填;编辑时 id 必填;similars 最多 200 个;effectiveTime 与 failureTime 必须同时为空或同时存在。 请求字段限制: - id:选填,知识 ID,仅编辑时必填 - robotId:必填,机器人 ID - name:必填,标准问 - similars:选填,数组 - answer:必填,答案内容,支持现有富文本协议 - categoryId:必填,分类 ID,0 表示根分类 - effectiveTime:选填,生效时间,毫秒时间戳;与 failureTime 必须同时为空或同时存在 - failureTime:选填,失效时间,毫秒时间戳;不得小于 effectiveTime - validitySwitch:必填,有效期设置:0-无效,1-有效 - isRich:选填,答案是否富文本,不传默认 1,默认值:1 - connectedIdList:选填,数组