Skip to content

sendBotStartMessage

Sahri Riza Umami edited this page Mar 16, 2017 · 6 revisions

Invites bot to a chat (if it is not in the chat) and send /start to it.

sendBotStartMessage(bot_user_id, chat_id, parameter)

Bot can't be invited to a private chat other than chat with the bot.
Bots can't be invited to broadcast channel chats.
Returns sent message.
UpdateChatTopMessage will not be sent, so returned message should be used to update chat top message.

Option Description
bot_user_id Identifier of the bot.
chat_id Identifier of the chat.
parameter Hidden parameter sent to bot for deep linking (https://core.telegram.org/bots#deep-linking). The parameters are start or startgroup or custom as defined by bot creator.

Example

There are alot of parameters to start a bot, please try one of these notes:

  • Privately message the bot by using the bot_user_id on both chat_id_ and bot_user_id_

    sendBotStartMessage(541771087, 541771087, 'start')
  • Use parameter that used by the bot. See https://core.telegram.org/bots#deep-linking.

    sendBotStartMessage(541771087, 541771087, 'start')
    sendBotStartMessage(541771087, 1234567890, 'startgroup')
  • If not by private message, make sure the bot is in the same chat as you.

    sendBotStartMessage(541771087, 1234567890, 'start')

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally