imgLi 文档imgLi 文档
GitHub

出站 Webhook

出站 Webhook

v0.3+ 在上传成功或审核裁决后,向配置的 URL 异步 POST JSON。失败只记日志,不阻塞上传。

配置

curl -sS -X PUT -b 'SESSION=...' -H 'Content-Type: application/json' \
  https://your-host/api/v1/admin/webhooks \
  -d '{"enabled":true,"url":"https://hooks.example.com/imgli","secret":"hmac-secret"}'

GET /api/v1/admin/webhooks 读取。启用时 URL 必填。

事件

type何时
image.uploaded上传成功
image.moderated审核 approve/reject

签名

配置 secret 时请求头:X-Imgli-Signature: sha256=<HMAC-SHA256(secret, body) 的 hex>User-Agent: imgli-webhook/1。请校验签名并做幂等。

相关

上传 API · 管理后台

最后更新: 2026-08-06