PHPackages                             matriphe/telegrambot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. matriphe/telegrambot

AbandonedArchivedLibrary[API Development](/categories/api)

matriphe/telegrambot
====================

PHP Library for Telegram Bot API.

1.0(10y ago)72581MITPHP

Since Jun 28Pushed 10y agoCompare

[ Source](https://github.com/matriphe/telegrambot)[ Packagist](https://packagist.org/packages/matriphe/telegrambot)[ RSS](/packages/matriphe-telegrambot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Telegram Bot PHP Library
========================

[](#telegram-bot-php-library)

PHP Library for [Telegram Bot API](core.telegram.org/bots/api).

Telegram Bot API
----------------

[](#telegram-bot-api)

First you must have a Telegram Bot. To do so, [just read the documentation on Telegram website](https://core.telegram.org/bots).

### TL;DR

[](#tldr)

1. Add [@BotFather](https://telegram.me/botfather) to start conversation.
2. Type `/newbot` and **@BotFather** will ask the name for your bot.
3. Choose a cool name, for example `The Cool Bot` and hit enter.
4. Now choose a username for your bot. It must end in *bot*, for example `CoolBot` or `Cool_Bot`.
5. If succeed, **@BotFather** will give you API key to be used in this library.

Installation
------------

[](#installation)

The easiest way to install is using [Composer](https://getcomposer.org).

```
composer require matriphe/telegrambot
```

Usage
-----

[](#usage)

For example, you can use the library like this:

```
