获取工单内图像
该接口用于获取服务台工单消息图象。仅支持自建应用。
请求
| 项目 | 值 |
|---|---|
| HTTP URL | https://open.feishu.cn/open-apis/helpdesk/v1/ticket_images |
| HTTP Method | GET |
| 接口频率限制 | 1000 次/分钟、50 次/秒 |
| 支持的应用类型 | custom |
| 权限要求 调用该 API 所需的权限。开启其中任意一项权限即可调用 | helpdesk:all:readonly 获取服务台资源详情 |
请求头
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Authorization | string | 是 | tenant_access_token 值格式:"Bearer access_token" 示例值:"Bearer t-7f1bcd13fc57d46bac21793a18e560" 了解更多:如何选择与获取 access token |
Tip: 服务台请求Header中还需添加“服务台token”参数:
Key: X-Lark-Helpdesk-Authorization
Value: base64(helpdesk_id:helpdesk_token),通过base64加密将helpdesk_id和helpdesk_token用':'连接而成的字符串。
查询参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
ticket_id | string | 是 | 工单ID 示例值:12345 |
msg_id | string | 是 | 消息ID 查询消息ID 示例值:12345 |
index | int | 否 | index,当消息类型为post时,需指定图片index,index从0开始。当消息类型为img时,无需index 示例值:0 |
响应
HTTP状态码为 200 时,表示成功
返回文件二进制流
错误码
| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 154000 | Bad request, please check your request body | 请求不合法,可能是 index 未填写或填写不正确。请检查 index 参数 |
| 403 | 154003 | Please check you have the correct access | 无权限。检查Authorization 和 X-Lark-Helpdesk-Authorization 是否正确、应用和服务台是否属于同一租户 |
| 404 | 154004 | Resource not found | 资源不存在,可能是 ticket_id 和 msg_id 不匹配。请检查 ID 值 |
| 401 | 154404 | Image might be deleted | 图片被删除 |
| 500 | 155000 | Internal error | 内部错误,请联系技术支持 |
