Answer the question
In order to leave comments, you need to log in
Telegram API, how to get the ID of a sent message?
I use Webhook, I need to get the ID of the message sent by the bot so that I can write it to the database in the future
. But I can’t quite figure out how to get the answer that should be after sending the message and how it looks
Answer the question
In order to leave comments, you need to log in
See the documentation for the sendMessage
method .
Read the line there:
Use this method to send text messages. On success, the sent Message is returned.
Translate it in the translator, understand what it means and go to the Message object, where there is a field:
message_id Integer Unique message identifier inside this chat
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question