Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.62 KB

AUTHTOKEN.md

File metadata and controls

38 lines (26 loc) · 1.62 KB

Creating a New Telegram Bot Using BotFather

To create a new bot on Telegram, you'll need to use BotFather, Telegram's official bot for creating and managing bots.

Steps to Create a New Bot

  1. Start a Chat with BotFather:

    • Open Telegram and search for @BotFather.
    • Start a chat with BotFather by clicking on the "Start" button.
  2. Create a New Bot:

    • Send the /newbot command to BotFather.
    • BotFather will ask you to provide a name for your bot. Choose a name (e.g., MyAwesomeBot).
    • Next, BotFather will ask you to choose a username for your bot. This username must end in bot (e.g., MyAwesomeBot_bot).
  3. Get Your Bot Token:

    • After successfully creating the bot, BotFather will provide you with an authentication token.
    • This token is essential for authenticating your bot when making API requests to Telegram's Bot API.
  4. Keep Your Token Secure:

    • Store your bot token securely. Do not share it with anyone else, as it provides complete access to your bot.
  5. Using the Bot Token:

    • Replace <YOUR_BOT_TOKEN> in API requests with the token provided by BotFather.
  6. Further Configuration:

    • Optionally, you can configure additional settings for your bot using BotFather, such as adding a description, profile picture, or enabling inline mode.
  7. BotFather Commands:

    • BotFather offers additional commands to manage your bot. You can explore these commands by typing /help in the BotFather chat.

Example API Request with cURL

Here's an example of how to use cURL to retrieve basic information about your bot:

curl https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getMe