Project

General

Profile

Actions

Todo #12402

open

Feedback on Configuration — Advanced Configuration Options — Notifications

Added by Viktor Gurov 23 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Configuration
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Page: https://docs.netgate.com/pfsense/en/latest/config/advanced-notifications.html

Feedback:

How to configure Telegram notifications:
1) Find the bot BotFather
2) Add a new bot with the commands: "/newbot", <botname>, <botusername> (must end in 'bot'),
save the API Token value
see https://core.telegram.org/bots#creating-a-new-bot and screenshot
3) Create a new private chat and add a new bot to it with the "Post messages" privilege
4) How to get private chat id:
4.1) First way:
Just send to the bot your invite link to your private channel
and check it with https://api.telegram.org/bot&lt;BOT_TOKEN&gt;/getUpdates:

{"ok":true,"result":[{"update_id":191337144,
"my_chat_member":{"chat":{"id":-1001550670765,"title":"myprivatetest","type":"channel"},"from":

4.2) Second way:
- You should convert your channel to public with some @channelName
- Send message to this channel through Bot API: https://api.telegram.org/bot111:222/sendMessage?chat_id=@channelName&text=123
- As response you will get info with chat_id of your channel:
{ "ok" : true, "result" : { "chat" : { "id" : -1001005582487, "title" : "Test Private Channel", "type" : "channel" }, "date" : 1448245538, "message_id" : 7, "text" : "123ds" } }

- Now you can convert Channel back to private (by deleting channel's link) and send message directly to this chat_id "-1001005582487"


Files

No data to display

Actions

Also available in: Atom PDF