Read about telegram bots at https://core.telegram.org/bots/tutorial.
Bots are not allowed to contact users. You need to make the first contact from the user for which you want to set up the bot.
- Create a bot with @BotFather, let's say with username
my_ftp_bot - Get bot token from BotFather's response, use it as
Tokenin config - Get bot id by run
curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getMe - Find
@my_ftp_botin telegram and start chat with it - Send
/startto bot - Run
curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdatesand find your chat id in response, use it asChatIDin config
Please note about shared flag. If it's true then bot instance will be shared between all connections.
If it's false then each user (or even each ftp connection) will have own bot instance and it can lead to telegram bot flood protection.
{
"version": 1,
"accesses": [
{
"fs": "telegram",
"shared": true,
"user": "my_ftp_bot",
"pass": "my_secure_password",
"params": {
"Token": "<YOUR_BOT_TOKEN>",
"ChatID": "<YOUR_CHAT_ID>"
}
}
],
"passive_transfer_port_range": {
"start": 2122,
"end": 2130
}
}