# 使用API发布到聊天频道？

**URL:** <https://meta.discourse.org/t/use-the-api-to-post-to-chat-channel/241871>\
**Category:** Development\
**Tags:** chat, rest-api\
**Created:** [2022年十月13日 20:31 UTC](https://meta.discourse.org/t/use-the-api-to-post-to-chat-channel/241871 "2022-10-13T20:31:27Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [2022年十月18日 16:41 UTC](https://meta.discourse.org/t/use-the-api-to-post-to-chat-channel/241871/5 "2022-10-18T16:41:56Z")

</div>

以供将来参考，通过 webhook 将消息发布到聊天频道的 API 是：

```plaintext
curl -i -X POST -d 'text=message' https://discourse.example.com/chat/hooks/aabbdcceeff.json

```

---

_[View the full topic](https://meta.discourse.org/t/use-the-api-to-post-to-chat-channel/241871)._
