Search by

amirxd / ultra-telegram

amirxdcy4455

A clean, extensible PHP client for the Telegram Bot API powered by PHP Ultra Request.

Package info

github.com/amirxdcy4455/UltraTelegram

pkg:composer/amirxd/ultra-telegram

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-11-03 17:53 UTC

This package is auto-updated.

Last update: 2026-11-03 18:02:09 UTC


README

A modern, extensible PHP client for the Telegram Bot API. Powered by PHP Ultra Request.

PHP 8.0+ Telegram Bot API 10.3 MIT License

UltraTelegram provides a lightweight, structured interface to Telegram's Bot API while delegating HTTP transport, middleware and concurrent requests to PHP Ultra Request.

Highlights

  • Dynamic access to Bot API methods, including newly added endpoints.
  • JSON requests and multipart uploads, including nested attach:// media.
  • File downloads through a streaming downloader.
  • Long polling, update dispatching and webhook request validation.
  • Concurrent API calls with callMany().
  • Read-only response objects and dedicated API/transport exceptions.
  • PHP 8.0+ and PSR-4 autoloading.

Requirements

  • PHP 8.0+
  • ext-curl and ext-json
  • amirxd/php-ultra-request

Installation

Until a stable Packagist release is available, add both GitHub VCS repositories to your application's composer.json:

{
  "repositories": [
    {"type": "vcs", "url": "https://github.com/amirxdcy4455/UltraTelegram"},
    {"type": "vcs", "url": "https://github.com/amirxdcy4455/UltraRequest"}
  ],
  "require": {
    "amirxd/ultra-telegram": "dev-main",
    "amirxd/php-ultra-request": "dev-main"
  }
}

Then run composer update.

Quick start

use Amirxd\UltraTelegram\UltraTelegram;

$bot = new UltraTelegram(getenv('TELEGRAM_BOT_TOKEN'));

$response = $bot->sendMessage([
    'chat_id' => 123456789,
    'text' => 'Hello from UltraTelegram!'
]);

$messageId = $response->getResultObject()?->get('message_id');

Keep your bot token in an environment variable or secret manager. Never commit it to source control.

Documentation

The README is intentionally short. Detailed API usage and implementation notes are maintained separately:

The docs/wiki directory contains standalone Wiki-ready pages. GitHub Wiki uses a separate Git repository; these source pages are kept here for version control.

Examples

Runnable examples are available in examples/.

Tests

composer test

License

MIT. See LICENSE.