mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 01:06:52 +00:00
Update Telegram Webhook docs (#15121)
This commit is contained in:
parent
26334d93bd
commit
5165b6b405
@ -4,14 +4,16 @@ description: "Telegram webhooks support"
|
|||||||
ha_category:
|
ha_category:
|
||||||
- Notifications
|
- Notifications
|
||||||
ha_release: 0.42
|
ha_release: 0.42
|
||||||
|
ha_iot_class: Cloud Push
|
||||||
ha_domain: telegram_bot
|
ha_domain: telegram_bot
|
||||||
---
|
---
|
||||||
|
|
||||||
Telegram chatbot webhooks implementation as described in the Telegram [documentation](https://core.telegram.org/bots/webhooks).
|
Telegram chatbot webhooks implementation as described in the Telegram [documentation](https://core.telegram.org/bots/webhooks).
|
||||||
|
|
||||||
Using Telegrams `setWebhook` method your bot's webhook URL should be set to `https://<public_url>:<port>/api/telegram_webhooks`.
|
By default this integration sets your bot's webhook URL automatically to `https://<external_url>/api/telegram_webhooks` with the external_url of your Home Assistant [configuration](/docs/configuration/basic/) using Telegrams `setWebhook` method.
|
||||||
|
|
||||||
This is one of two bot implementations supported by Telegram. Described by Telegram as the preferred implementation but requires your Home Assistant instance to be exposed to the internet.
|
This is one of two bot implementations supported by Telegram. Described by Telegram as the preferred implementation but requires your Home Assistant instance to be exposed to the internet.
|
||||||
|
The other implementation method is [Telegram polling](/integrations/telegram_polling/), for which your Home Assistant instance does not have to be exposed to the internet.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
@ -22,15 +24,14 @@ To integrate this into Home Assistant, add the following section to your `config
|
|||||||
telegram_bot:
|
telegram_bot:
|
||||||
- platform: webhooks
|
- platform: webhooks
|
||||||
api_key: YOUR_API_KEY
|
api_key: YOUR_API_KEY
|
||||||
parse_mode: html
|
|
||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
- 12345
|
- 123456789 # example id of a user
|
||||||
- 67890
|
- -987654321 # example id of a group, starts with a -
|
||||||
```
|
```
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
description: A list of ids representing the users and group chats that are authorized to interact with the webhook.
|
description: A list of ids representing the users and group chats that are authorized to interact with the bot.
|
||||||
required: true
|
required: true
|
||||||
type: list
|
type: list
|
||||||
api_key:
|
api_key:
|
||||||
@ -72,10 +73,11 @@ The configuration sample below shows how an entry can look like:
|
|||||||
telegram_bot:
|
telegram_bot:
|
||||||
- platform: webhooks
|
- platform: webhooks
|
||||||
api_key: YOUR_API_KEY
|
api_key: YOUR_API_KEY
|
||||||
|
parse_mode: html
|
||||||
trusted_networks:
|
trusted_networks:
|
||||||
- 149.154.160.0/20
|
- 149.154.160.0/20
|
||||||
- 91.108.4.0/22
|
- 91.108.4.0/22
|
||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
- 12345
|
- 123456789 # example id of a user
|
||||||
- 67890
|
- -987654321 # example id of a group, starts with a -
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user