telegramtelegram-botpython-telegram-botphp-telegram-botlua-telegram-bot

Can I use chat_id to send message to clients in Telegram bot after a period of time?


I want to say to clients to start my chat bot and send me username and password, then I store chat_id of them, and use it whenever I want to send a message to one of them.

Is it possible? or chat_id will be expire?


Solution

  • If the chat_id is the same as the Telegram user_id for that client, then yes you can.

    SendMessage:

    chat_id  [Required]  [Integer]  Unique identifier for the target chat   
    text     [Required]  [String]  Text of the message to be sent