# Discourse Chat Webhook Documentation

**URL:** https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667
**Category:** Development
**Created:** [March 19, 2023, 6:24pm UTC](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667 "2023-03-19T18:24:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Amit\_Ghosh](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amit_ghosh/32/132242_2.png) [@Amit\_Ghosh](https://meta.discourse.org/u/Amit_Ghosh)
#### Post date: [March 19, 2023, 6:24pm UTC](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667/1 "2023-03-19T18:24:01Z")

</div>

Continuing the discussion from [Use the api to post to chat channel?](https://meta.discourse.org/t/use-the-api-to-post-to-chat-channel/241871/5):

```plaintext
webhook_url = 'https://forum.unofficed.com/chat/hooks/fff.json'
payload = {
    'text': 'Hello, world!',
    'username' : 'dexter',
    'avatar_url': 'https://forum.unofficed.com/user_avatar/forum.unofficed.com/dexter/120/801_2.png' 
}
response = requests.post(webhook_url, data=payload)

```

Now what are the parameters I can give like I have given the key “text”. I added username and avatar\_url as a reference from discord. But is there any documentation detailed?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [March 20, 2023, 3:43am UTC](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667/2 "2023-03-20T03:43:52Z")

</div>

Welcome back! 👋

If you’re using the webhook, the only available parameter is `text`.  
You define a username/avatar when you create the webhook (admin → plugins → chat).

> Incoming webhooks can be used by external systems to post messages into a designated chat channel as a bot user via the `/hooks/:key` endpoint. The payload consists of a single `text` parameter, which is limited to 2000 characters.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 19, 2023, 3:44am UTC](https://meta.discourse.org/t/discourse-chat-webhook-documentation/258667/3 "2023-04-19T03:44:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
