[Show NC] Telegram Bot API PHP SDK - Build your own automated bots easily!

  • So i just wanted to share an open-source project i had created for the recently launched Telegram Bot API.

    For those who don't know, Telegram is a messenger just like Whatsapp and various other messaging app but offering much more features and secure in terms of security and open source.

    Now Telegram launched their Bot API which lets anyone create an automated bot which people can interact with. Either privately or in a group chat.


    Bots are special Telegram accounts designed to handle messages automatically. Users can interact with bots by sending them command messages in private or group chats.

    Blog Post: https://telegram.org/blog/bot-revolution
    More details: https://core.telegram.org/bots

    Since Telegram itself isn't offering any official SDK / Library for the development of these bots. I made one for PHP language and launched 2 months ago. It has since been picked up by lot of people and has reached close to 1k downloads and Telegram is now officially recommending the library for PHP developers on their site as well as via Support.

    Check out the SDK: https://github.com/irazasyed/telegram-bot-sdk

    Currently, The SDK supports all the available API methods as well as some helper methods to make development easier. I recently pushed commands handler system too. So it's a lot easier for anyone to build their own bots. The SDK also comes with Laravel support out of the box, which i personally love to use with and is quite popular among PHP developers.

    I'm actively developing the SDK and pushing updates as & when i improve it as well as whenever there's a change from the official API. But the more people use and give feedback and even contribute, The better it gets.

    Some ideas for bots (Including Targeted to Indian market):

    • Stock Market Updates: Those Buy/Sell thingy, I've seen a bunch of apps but a bot alerting about a particular subscribed item might be good for the traders.
    • News Updates (City wise Ex: Bangalore / Topic wise Ex: Startups of India)
    • Traffic Alerts
    • Shopping Deals: We know how much people love shopping, So a bot that alerts upcoming or current offers for a specific category on a specific site would be good or maybe watch for a product's price to go down. I have some ideas for revenues too, So if anyone wants to work on this, Feel free to PM me.
    • Support System: This can be huge but i think its best if you already have a support system software and just add Telegram support to it. So people can talk to your company or third-party company via Telegram while the agents assist the end-user.
    • Alert me if x goes down: Simple ping kinda system which would monitor a given link and notify you if it goes down.
    • Notification Bot: Its only purpose is to notify you or the end-user for web based products/app. Say for example, I wanna keep track of my sales every hour. The bot will notify me of all the sales. Its like i have my own app but i don't need to make one (It's an example, Sky is the limit).

    I have plenty of more ideas which may or may not have already been executed but these are just a few for everyone to get started and to explore the bots area and build something cool, understand what's possible. ANYTHING!

    Let me know if you have any questions, I would be more than happy to help.

    P.S If any issues / feedback / feature requests related to the SDK itself, Please visit the github link above and create an issue ticket. I don't want this thread to become a support thread.

  • This is fantastic contribution. Do you maintain a list of implementations of your API? Building an Artificial Intelligence enabled chatbot would be perfect use case.

    Have you talked to Telegram people to see if they officially support your API?

    Did you know notCRUD has cool signatures? Use them by going to your User Profile > Edit.

    Personal blog: paraschopra.com/blog/


  • @paraschopra Thanks and I don't maintain any such list but that's a good idea. I'll probably put up a note asking people to submit their bot details. Also, yes AI enabled bots would be perfect.

    I spoke with Telegram support, yes! They do support and have already put up my library on their site:

    They've already been recommending people over the chat (They have official Telegram Bot Support @BotSupport) to use the library for PHP developers. Just recently they put up that page too. But obviously they can't make the library as their official SDK, They're just recommending to use, that's all.

  • Released first major version 1.0 - https://irazasyed.github.io/telegram-bot-sdk/

    Includes some new features like automated commands handler system and other things.

    Change Log: https://irazasyed.github.io/telegram-bot-sdk/changelog/