Webhook 通知并帮助您收集在 Crowdin 企业版上发生的关键事件的信息,例如译文完成或校对。 当您针对项目配置 Webhook 后,Crowdin 企业版将开始通过 HTTP 发送带有数据的 POST 或 GET 请求。
只有行政管理和组/项目管理员才能注册 webhook。
您可以通过添加 webhooks 来建立与服务或与您后端的集成。 例如:
您可以为以下类型的事件配置 webhooks:
在 Crowdin 开发者门户上阅读有关 基于文件的 Webhook 事件 和 基于字符串的 Webhook 事件 的更多信息。
To configure webhooks in Crowdin Enterprise, open your project and go to Integrations > Webhooks on the left panel. Click Create to start configuring your new webhook.
您需要提供以下信息才能注册 Webhook:
Optionally, you can add special headers to your webhook. 作为一种授权方法,它们可以用来提供更多的安全保障。 For example, if you add headers, your webhook endpoint can check them to ensure that information is coming from Crowdin Enterprise.
When adding a webhook, you can test how your application will react to that call.
Depending on your approach to webhooks management, you might need to add dedicated Crowdin Enterprise IP addresses to your firewall to allow Crowdin Enterprise to open the pre-configured webhook URLs.
Read more about IP Addresses.
Each event type in Crowdin Enterprise has a specific payload format with the relevant event information. You can customize the webhook payload to add and organize the elements the way your system requires.
To check the event’s possible variables, hover over the Info icon in the Payload section’s right upper corner.
With the help of Crowdin Enterprise webhooks, you can send notifications about pre-configured event types directly to a specific Slack channel.
To configure the webhooks’ sending to Slack, you’d need to create a simple Slack app. Read more about Sending messages to Slack using Incoming Webhooks.
As soon as you create and configure your Slack app, you’ll have a Webhook URL that should be used for the Webhooks configuration in your Crowdin Enterprise project.
"text"
field, and the Batch webhooks option is cleared. 您可以访问特定项目中所有现有的 web 钩子的列表。 您能够从显示的 Web 钩子列表中编辑或删除任何 Web 钩子。
After the events are triggered, you will be able to review the activity of each webhook separately. Use the filter to review all or only unsuccessful webhook notifications.
Alternatively, you can review the full list of sent webhooks in the Webhooks Log. Filter webhook notifications by result (Any or Unsuccessful), event types, or name.
过去 24 小时内响应代码为 4xx 或 5xx 范围内且失败次数达到 100 次及以上的 Webhook 会被自动禁用。
已禁用的 Webhook 会在 Webhooks 部分列出,并显示一个清除的勾选标记,表示它们当前由于持续失败而处于非活动状态。 要发现更多有关失败的 Webhook 信息,请导航到 调用历史 > 失败 部分。 在这里,您可以探索有关每个失败的 Webhook 所遇到的问题的详细信息。
一旦您识别并解决了 Webhook 失败的原因,就可以手动重新启用 Webhook 以恢复其功能。 在 Webhooks 部分,找到已禁用的 Webhook 并选择它进行重新启用。
在 Webhook 使用上有任何问题或需要帮助? 联系支持团队。