Skip to content
G GBTI

How to get a Telegram Bot Token - AndShare Tutorial

  • gbti
  • products
  • andshare

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 co-op, powered by Git

Join the GBTI Network

The GBTI Network is a creator co-op. Members showcase their work, write articles, share in co-op profits, and meet in weekly coaching calls with the community.

Publish your profile, blog posts, products, and prompts
Share in co-op profits
Join weekly coaching calls with the community

A 90-day limited-access trial lets you evaluate the community before you pay. Paid membership is $150 per year and unlocks your public presence on the network: your profile, blog, products, and prompts.

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

Members write comments from the GBTI client or browser extension. Become a member to join the conversation.

Written by

GBTI Network

Published 1st Sep 2023

View profile
Contribution history
No tracked contributions yet. A member who improves this article through an accepted pull request earns a share of the revenue it generates.

Imported from the legacy WordPress site, so the earliest edits live there. Everything since is tracked here as member contributions.

Full history on GitHub Spotted something? Become a member to contribute.

Related posts

Sign in with the GBTI extension

Signing in and publishing happen through the free GBTI browser extension. It keeps your GitHub sign-in on your own machine and lets you edit and publish in place.

The Chrome Web Store listing is coming soon. For now, the download page walks you through loading it as an unpacked extension.