> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# 触发 Webhook 事件

> 通过触发测试事件来验证您的 Webhook 端点。

<Tip>
  即刻安装 [Cobo WaaS Skill](/developers/v2_cn/guides/overview/cobo-waas-skill)，在 Claude Code、Cursor 等 AI 开发环境中使用自然语言集成 WaaS API，显著提升开发效率 🚀
</Tip>

使用此命令通过触发测试 webhook 事件来测试您的 webhook 端点的功能。测试事件将发送到您在 Cobo Portal 上注册的所有 webhook 端点。您可以选择提供 `override_data` 选项来自定义 Payload。

## 用法

```shell theme={null}
cobo webhook trigger <event_type> [options]
```

## 参数

`<event_type>`：您想要触发的 webhook 事件类型。可能的值包括：

* `wallets.transaction.created`
* `wallets.transaction.updated`
* `wallets.transaction.failed`
* `wallets.transaction.succeeded`
* `wallets.mpc.tss_request.created`
* `wallets.mpc.tss_request.updated`
* `wallets.mpc.tss_request.failed`
* `wallets.mpc.tss_request.succeeded`

<Info>您也可以运行 [cobo webhook events](/developers/v2_cn/developer-tools/cobo-cli/event-types) 命令来获取所有可用事件类型的最新列表。</Info>

## 选项

`--override <json_string>`：使用提供的 JSON 字符串覆盖事件 Payload 中的特定字段。

## 示例

此命令触发一个 `wallets.transaction.updated` 事件，并指定 `chain_id` 和 `amount` 值：

```shell theme={null}
cobo webhook trigger wallets.transaction.updated --override '{"chain_id": "ETH", "amount": "1000000000000000000"}'
```

## 最佳实践

* **测试所有事件类型**：触发您的 App 订阅的所有 webhook 类型的事件，确保您的系统能正确处理每种类型。
* **使用真实数据**：在覆盖事件数据时，尽量使用与您的生产场景匹配的真实值。
* **测试错误处理**：使用边缘情况数据触发事件，确保您的 webhook 消费者能处理意外情况。
* **验证 webhook 传递**：触发事件后，检查您的 webhook 端点日志以确认事件已被正确接收和处理。
