想通过飞书发图片消息,流程是:
1. POST multipart 到 `/open-apis/im/v1/images`,用 Bot Token,拿到 `image_key`
2. 用这个 `image_key` 构建消息 content 发送
踩过的坑:用 User Token 上传会报权限错误;Content-Type 必须是 `multipart/form-data`,不能是 JSON;`image_type` 字段要传 `"message"`。
把这个流程封装好之后,发图片就很顺了。