Download the PHP package protobrick/mtproto-client without Composer

On this page you can find all versions of the php package protobrick/mtproto-client. 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?
protobrick/mtproto-client
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package mtproto-client

Proto Brick

Latest Stable Version PHP Version API Layer Telegram Chat

Proto Brick is just starting its journey. Your stars ⭐️ are crucial for the project's visibility!

Proto Brick

Modern async pure PHP client library for Telegram MTProto. Build userbots with direct API access — no TDLib dependencies.

[!NOTE] 🚧 Work in Progress: This library is currently under active development. Features are being added rapidly, and breaking changes may occur before the v1.0 release.

🚀Features

📋Requirements

Installation

Authentication

Interactive Login (CLI)

Run once to log in. It prompts for credentials (phone, code, 2FA) and saves the session locally.

Custom Flow

If you need to handle login programmatically (e.g., from database, API, or custom input), pass callables

Calling API Methods

Use this for simple scripts (e.g., cron jobs) where you need to perform an action and exit.

Handling Updates

Use the Event Loop to build bots or tools that react to events in real-time.

Async vs Sync Execution

The client provides generated *Async methods for every API call.

1. Synchronous & Concurrent

Use synchronous calls for simple logic, and concurrent execution for performance.

2. Fire & Forget

Use ignore() for tasks where you don't care about the result or errors.

[!WARNING] ignore() pushes the task to the Event Loop.

  • Short Scripts: If your script ends immediately (reaches the end of the file), the Event Loop stops, and the request will not be sent.
  • Daemons/Bots: This works perfectly inside $client->start() or long-running processes, as the loop keeps turning.

Advanced Configuration

You can customize the connection settings via the Settings object:

Architecture

Generated Code

The core of this library is generated automatically:

API Layer Updates (Schema)

You can regenerate the library API for a newer or older API layer yourself, without waiting for a release.

  1. Download the new .json schema file (e.g., from here).
  2. Ensure the filename contains the version number (e.g., TL_telegram_v220.json).
  3. Place the file in the schema/ directory (you can keep the old ones; the builder automatically picks the highest version).
  4. Run the builder:

Downgrading: To build using a specific schema file, pass the path as an argument:

⚠️ Disclaimer

This library is intended for personal automation and educational use. We are not responsible for any account limitations caused by misuse, spamming, or violating Telegram's Terms of Service. Please automate responsibly.

💬 Community & Support

ProtoBrick is a young library, and we are building a community of developers interested in MTProto.

Contributions (PRs) are always welcome!

License

MIT License. See LICENSE for details.


All versions of mtproto-client with dependencies

PHP Build Version
Package Version
Requires php-64bit Version >=8.2
ext-json Version *
ext-zlib Version *
phpseclib/phpseclib Version ^3.0
amphp/sync Version ^2.3
amphp/socket Version ^2.3
revolt/event-loop Version ^1.0
psr/log Version ^3.0
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 protobrick/mtproto-client contains the following files

Loading the files please wait ...