As described in the Telegram Bot API, this is the manual procedure needed in order to get the necessary information.
- Create the Bot and get the Token
On a Telegram client open a chat with BotFather.
/newbot to BotFather and fill in all the needed information. The authentication token that is given will be needed in the next steps.
- Create the destination chat
Open a chat with your new Bot and send any message to it. The next step will not work unless you send a message to your bot first.
- Get the chatId
Open a browser and invoke
<token> is the authentication token previously obtained)
Look at the JSON result to find the value of
id. That is the chatId. Note that if using a Telegram group chat, the group chatIds are prefixed with a dash that must be included in the config file. (e.g. bot1.chatId: -22334455)
- Test the bot
Open this URL in your web browser, replacing <token> with the authentication token and <chatId> with the chatId:
Your Telegram-bot should send you a message with the text: