How to Get Telegram API ID, Hash & Bot Token (2026 Guide)

Written by

in

Unlocking the Telegram API: A Complete Guide to Getting Started

Telegram is famous for its speed, security, and developer-friendly ecosystem. Whether you want to build a custom messaging client, automate tasks, or develop a mini-app, the first step is getting your API credentials.

However, Telegram offers two distinct types of APIs depending on what you want to build: the Telegram Client API (MTProto) for building custom user applications, and the Telegram Bot API for creating automated bots.

This guide walks you through how to get the credentials for both.


Method 1: Getting the Client API (api_id and api_hash)

Use this method if you are building a custom client or application that interacts directly with a user account using the MTProto protocol.

  1. Log in to your Telegram account: Ensure you have an active Telegram account set up on an official mobile or desktop app.
  2. Visit the My Telegram portal: Open your browser and go to my.telegram.org.
  3. Authenticate: Enter the phone number associated with your Telegram account in international format. Telegram will send a login confirmation code straight to your official Telegram app.
  4. Access API Development Tools: Once logged in, click on API development tools.
  5. Fill out the application form:
    • App title: Give your project a name (

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *