InstaHaul
  • Introduction
  • Usage Flows (FlowCharts)
  • Firebase
    • Firebase
    • Firebase firestore database
    • Firebase Security
    • Firebase Storage
    • Firestore indexes
    • Chat & Live tracking
  • Backend
    • Prerequisite
    • VPS/Shared Hosting
    • Installation
    • Composer & Node Packages
    • Database Configuration
    • GUI Installer
    • Timezone
    • Firebase
    • Web Notification
    • Firebase Forgot password
    • Change Backend Color
    • Reskin Mobile App
    • Terminal
      • Commands
    • Screenshots
    • Order schedule
    • CRON job
    • Clear Data (Users/Orders etc)
    • Email Server Settings
    • SMS Gateway
    • Payment Gateways
    • Webhooks - Payment gateway
    • Language / Translation
    • HOW TO UPDATE
    • In-App Live chat/support
    • Geocoding and Place search
    • Features
      • Firebase/Notification Delay
      • Fleet Management
      • Loyalty points
      • Home Screen Design
      • Featured Vendors
      • Trip recalculation/Outstanding payments
      • Switch between Taxi/Regular Driver
      • Data Translation - Backend
  • Flutter App
    • Getting Started
    • Steps
    • Directory Structure
    • Change App Name & ID
    • Change App icon & splash
    • App Color / Theme
    • Connect To Backend
    • Firebase
    • Firebase Auth - Phone
    • Firebase Phone OTP - Android
    • Firebase Phone OTP - iOS
    • Firebase Notification iOS
    • Share link - Firebase dynamic link
    • Social Media Login
      • Google login
      • Facebook Login
      • Sign-In with Apple
    • Google Map
    • Change App Language
    • Notification Sound
    • Custom Translation
    • Change App Font
    • Running on VS Code
    • Running on Android Studio
    • Generate Android Release App
    • Upload to Apple App Store
    • Screenshots
  • Demo Accounts
  • FAQs
    • Backend Image not working
    • Backend Backup not working
    • Upgrade without losing data
    • Backend Rollback
    • Blank Home screen
    • Custom Token
    • Product price zero(0) in details
    • Auto-cancel Not working
    • Pharmacy vendor
    • Vendor default rating
    • App logins
    • Error ==> type 'String' is not a subtype of type 'int'
    • NDK version error
    • Push Notification
    • Delivery Zone Map error
    • HOW TO UPDATE ADMINEND
    • Driver app rejected by Google
    • Cron job error
    • Auth pages Not working - App
  • HOW-TO
    • Onboarding Settings
    • Earning
      • Drivers
    • Enforce CASH Payment For Delivery Fee Only
    • System Contact Email
    • Driver Matching Flow
  • Extensions
    • Driver tracking extensions
    • Paymongo Gateway
    • Mercadopago Gateway
    • Nagad [Bangladeshi]
    • Instamojo - Payment
    • Paytrail
    • Paymaya Gateway
    • Emailer
    • External Notifier
      • Slack Setup
      • Telegram Setup
  • Upgrades
    • How to update
    • Important: Backend VPS/Shared hosting
    • 1.0.1
    • 1.1.00
    • Change logs
Powered by GitBook
On this page
  • How To Create Telegram Bot
  • How To get Telegram Chat Id
  • Set Token & Chat Id in backend
  1. Extensions
  2. External Notifier

Telegram Setup

How To Create Telegram Bot

To create a Telegram bot and get its API token, follow these steps:

  1. Start a Chat with BotFather

    • Open the Telegram app on your phone or computer.

    • In the search bar, type "BotFather" to find the bot that Telegram has created to assist you in creating your own bot.

    • Select "BotFather" from the search results.

  2. Create a New Bot

    • Once you have opened a chat with BotFather, click or tap on the "Start" button.

    • Now, you can create a new bot by sending the command "/newbot".

    • BotFather will then ask you for a name for your bot. This can be any name you choose.

    • After that, you'll be asked for a username. This must be unique and end with "bot" (like tetris_bot or tetrisbot).

  3. Get the API Token

    • Once you've successfully created your bot, BotFather will provide you with a token. This token will look somewhat like this: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11

    • You will use this token to access the Telegram API, so keep it safe.

How To get Telegram Chat Id

A chat ID in Telegram is a unique identifier for a chat, whether it's a user-to-user chat or a group chat. You can get the chat ID by sending a message from your new bot to the desired chat and then using the Telegram API to retrieve that message. The ID of the chat will be included in the data about the message.

However, one easy method to obtain chat ID is:

  1. Add the bot to the group. Go to the group info and press "Add Member". Start typing your bot's name and select it from the dropdown.

  2. Get the list of updates for your bot from Telegram. Open your web browser and navigate to https://api.telegram.org/bot<YourBOTToken>/getUpdates. Replace <YourBOTToken> with the token you got from BotFather.

  3. Look for “chat”:{“id”:-XXXXXXXXX,…..}, where -XXXXXXXXX is your chat id (group id).

Please remember to handle your tokens with care. They are equivalent to a password and can be used maliciously if they fall into the wrong hands.

Set Token & Chat Id in backend

PreviousSlack SetupNextHow to update