Download the PHP package vjik/telegram-bot-api without Composer
On this page you can find all versions of the php package vjik/telegram-bot-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package telegram-bot-api
Telegram Bot API for PHP
The package provides a simple and convenient way to interact with the Telegram Bot API.
✔️ Telegram Bot API 7.11 (October 31, 2024) is fully supported.
Requirements
- PHP 8.2 or higher.
Installation
The package can be installed with Composer:
General usage
To make requests to the Telegram Bot API, you need to create an instance of the TelegramBotApi
class
that requires an instance of the TelegramClientInterface
implementation. Out of the box, the package provides PsrTelegramClient
based on the PSR-18 HTTP client
and PSR-17 HTTP factories.
For example, you can use the php-http/curl-client and httpsoft/http-message:
In this case, a TelegramBotApi
instance can be created as follows:
Now you can use the $api
instance to interact with the Telegram Bot API. Method names are the same as in the Telegram Bot API documentation. For example:
The result will be either a FailResult
instance (occuring on an error) or an object of the corresponding type (occuring on success). For example:
Documentation
- Logging
- Webhook handling
- Custom requests
- Internals
If you have any questions or problems with this package, use author telegram chat for communication.
License
The vjik/telegram-bot-api
is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.
Credits
The package is inspired by Botasis code originally created by Viktor Babanov.
All versions of telegram-bot-api with dependencies
php-http/multipart-stream-builder Version ^1.4.2
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
psr/http-message Version ^1.1|^2.0