Skip to content
GBTI

How to get a Telegram Bot Token - AndShare Tutorial

Creating a Telegram bot and getting a bot token involves a few steps:

Step 1: Talk to BotFather

  1. Open your Telegram app, then search for the “BotFather” bot. The username is @BotFather.
  2. Start a chat with BotFather by clicking the “Start” button at the bottom of the screen.

Step 2: Create a New Bot

  1. Type /newbot to create a new bot.
  2. BotFather will ask you for a name for your bot. Type the name and send it.
  3. Next, you’ll be asked to choose a username for your bot. This username must end in bot, like examplebot or example_bot.
  4. If all goes well, BotFather will congratulate you and provide you with a token.

Step 3: Store the Token

  • After creating the bot, you’ll get a message that contains the token for the bot. Make sure to save this token securely as you’ll need it to interact with the Telegram API.

Note

  • You’ll need to make your bot an admin in your Telegram channel or group to post messages, delete messages, etc.

The token will look something like this:

110201543:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw Replace <YOUR_BOT_TOKEN> in the code with this token.

After these steps, you can use this token to perform operations as your bot, like sending messages, in the context of the Telegram API.

For more advanced features or for the official documentation, you can visit the Telegram Bot API documentation.

A creator network, powered by Git

Join the GBTI Network

The GBTI Network is a creator community. Browse, follow, and save across the network for free, no card required. Join a paid tier to take part and share in the revenue.

Network Supporter ($50/year): post comments across the network; full Discord access; read members-only content and comment bodies; see the member-only Shares stream; and publish articles, projects and prompts, members first and public after editorial review. Supporters share in the revenue program.
Become a member You are reading GBTI Network's work. Joining from this page credits GBTI Network.

Publish your work on the network. Submit content

Written by

GBTI Network

Creative. Curative. Community. Cooperative. Published 2nd Sep 2023

View profile

Get the weekly digest

Never miss content by subscribing to our digest. Subscribing is completely free.

Unsubscribe in one click from any issue. Read the privacy policy.

You are signed in. Edit Notification Settings

0 Comments

No comments yet. Be the first. Members comment from the GBTI local client, where comments are submitted as pull requests and auto-published for paid members.

Become a member

Comments are for members. Become a member to join the conversation, or if you already are.

You are signed in as a member. .

Contribution history

Related posts

Join the GBTI co-op

Saving, collecting, and following are member perks. Sign in with a free GitHub account to keep what you find, and become a member to comment, join the Discord, and unlock members-only content.

God bless the internet

Subscribe to the Digest

Member articles, projects, skills & prompts, curated shares sent weekly to your inbox.

It arrives on Tuesday mornings. Unsubscribe in one click from any issue. Read the privacy policy.

You are signed in. Edit Notification Settings

Already a member? The digest is in your notification settings.