Do bots have chat_id
like user accounts? Where can I find it? I want to use it to send messages to my bot using pyrogram
.
Question posted in Telegram API
A comprehensive official documentation can be found here.
A comprehensive official documentation can be found here.
2
Answers
Chat IDs are the same for everyone that accesses that chat. In private messages (1-to-1 chats),
chat_id == user_id
.Two Examples:
chat_id
of@PyrogramChat
is-1001387666944
, no matter who accesses or retrieves it.@PyrogramBot
has theuser_id
483849041
, to send it a message you can use that ID as thechat_id
.As for how to send messages, see the Documentation.
Yes they do, bot tokens are in that format –
BOT_ID:SOME_STUFF
, in here BOT_ID is your bot’s id.