jungle-bay/telegram-bot-api

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP Library for Telegram Bot API

3.6 2018-03-13 21:53 UTC

This package is not auto-updated.

Last update: 2024-01-08 21:28:50 UTC


README

Telegram Bot API Logo

Telegram Bot API

Travis CI Scrutinizer CI Codecov

This is PHP Library for Telegram Bot API.
You can follow this documentation to work with the library.

Prerequisites

  • PHP 5.5 or above.
  • curl, json extensions must be enabled.

Install

The recommended way to install is through Composer:

composer require jungle-bay/telegram-bot-api

The simplest example of use

<?php

require_once __DIR__ . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, array('vendor', 'autoload.php'));

$tba = new \TelegramBotAPI\TelegramBotAPI('123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11'); // Your token bot.

$bot = $tba->getMe();

echo 'Hello world! Im bot ' . $bot->getFirstName() . ' !';

Note

License

This bundle is under the MIT license. See the complete license in the file: here.