Download the PHP package oihso/telegram-bot-api-bundle without Composer

On this page you can find all versions of the php package oihso/telegram-bot-api-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telegram-bot-api-bundle

TelegramBotApiBundle

A symfony wrapper bundle for Telegram Bot API.

What's the difference with the original one?

Install

Via Composer

If moving from original bundle

  1. Remove old package by running composer remove borsaco/telegram-bot-api-bundle
  2. Change use statements in your code from Borsaco\... to Oihso\...
  3. Install new package by running composer require oihso/telegram-bot-api-bundle

New version of package is fully compataible with the old one. No need to change config/code except for use statements

Configure the bundle

This bundle was designed to just work out of the box. The only thing you have to configure in order to get this bundle up and running is your bot token.

Usage

You can access the bot in the controller with :

Webhook

In order to receive updates via a Webhook, You first need to tell your webhook URL to Telegram. You can use setWebhook method to specify a url and receive incoming updates via an outgoing webhook or use this commands:.

for get information about webhook of bot:

for set webhook url for the bot:

for delete webhook of the bot:

Once you set the webhook using the setWebhook method, You can then use the below function to retrieve the updates that are sent to your Webhook URL. The function returns an array of Update objects.

Maintenance

If want to use maintenance of bots you can check $bot->isMaintenance('bot_name') in your entry point controller and send response message.

Next...

Please refer to Telegram Bot API Official Document for getting information about available methods and other informations.

Troubleshooting

If you did all the configurations correctly but still getting errors (Http error 500) even on getMe() method, it might be because of SSL Verification. Please make sure you have up-to-date CA root certificate bundle to be used with cURL.

You can configure you CA root certificate bundle by:

  1. Downloading up-to-date cacert.pem file from cURL website and
  2. Setting a path to it in your php.ini file, e.g. on Windows:

    curl.cainfo=c:\php\cacert.pem

You can test your SSL-setup online with this handy webtool on: SSL Labs

License

The BSD License. Please see License File for more information.


All versions of telegram-bot-api-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2 || ^8.3
symfony/framework-bundle Version ^6.4
symfony/http-kernel Version ^6.4
irazasyed/telegram-bot-sdk Version ^3.4
symfony/dependency-injection Version ^6.4
symfony/console Version ^6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oihso/telegram-bot-api-bundle contains the following files

Loading the files please wait ....