How to Create a Telegram Bot ID/Chat ID
To create a bot in today’s popular application Telegram and use it as API in applications;
primarily;
Membership of Telegram.org
is required. For this, it is enough to have a working mobile number.
We are installing the Telegram application on our phone.
We validate our mobile phone number for membership and the fields to be requested in the follow-up.
After the membership process, we log on to the telegram web page.
Log in with your member login at https://web.telegram.org
the web site and send it to the Telegram application on your phone (not as SMS). The telegram application on our phone will now appear in the browser.
Robot for bot preparation (telegram robot) We are adding BotFather to contact list.
He starts a chat with us, asking us what we want to do.
1 2 3 4 5 6 7 8 | BotFather is the one bot to rule them all. Use it to create new bot accounts and manage your existing bots. About Telegram bots: https://core.telegram.org/bots Bot API manual: https://core.telegram.org/bots/api Contact @BotSupport if you have questions about the Bot API. |
When we come across this article we send the following command and we prepare our bot / api documents according to the answers.
When sending commands to the bot, the commands must have an apostrophe “/”
. This command “/newbot”
is the name of the command to create a new bot.
1 2 3 4 5 6 7 | /newbot #BotFather: Alright, a new bot. How are we going to call it? Please choose a name for your bot. TechSoftCenter #BotFather: "Good. Now let's choose a username for your bot. It must end in `bot`. Like this, for example: TetrisBot or tetris_bot." |
# When you write this message the application asks you what the bot’s username will be this time. At this stage, you need to add _bot
to the end of your bot name.
1 2 3 4 5 6 7 | TechSoftCenter_bot #BotFather: "Done! Congratulations on your new bot. You will find it at t.me/TechSoftCenter_bot. You can now add a description, about section and profile picture for your bot, see /help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this. Use this token to access the HTTP API: 382022228:AAHZnewtR3-_IYSDQRCWBVfaeceVKZ_22222 For a description of the Bot API, see this page: https://core.telegram.org/bots/api" |
# The answer is that the process is complete and now the bot is active, you want descriptions, profile, picture or other command details to view the relevant link is enough to use the application can quickly share.
For support, the bot tells you that you need to access support with a username and sends you a list of Api Code and api documents.
Now you have BOTID information. You can use this in other telegram communication applications.
ChatID (Chat ID number)
to reach this information
1 | https://api.telegram.org/bot{Share APIID-Identification Number] / getUpdates |
When you send
1 2 | {"ok":true,"result":[{"update_id":379225167, "message":{"message_id":5,"from":{"id":328225576,"first_name":"Techsoftcenter","language_code":"tr-TR"},"chat":{"id":322245576,"first_name":"Techsoftcenter","type":"private"},"date":222,"text":"hello"}},}}]} |
you will receive this kind of information
1 | chat":{"id":328345576,"first_name |
The id between is your chat id information.
Chatid
and Api ID
information is required together in the applications. You should use them in your application.