PHPackages                             davtur19/turibot - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. davtur19/turibot

ActiveProject[HTTP &amp; Networking](/categories/http)

davtur19/turibot
================

A simple way to communicate with Telegram APIs in PHP.

2.16(11mo ago)12315.0k↓35.3%31AGPL-3.0-or-laterPHPPHP ^8.1

Since May 2Pushed 11mo ago5 watchersCompare

[ Source](https://github.com/davtur19/TuriBot)[ Packagist](https://packagist.org/packages/davtur19/turibot)[ RSS](/packages/davtur19-turibot/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (66)Used By (0)

TuriBot
=======

[](#turibot)

> TuriBot is a simple way to communicate with Telegram APIs in PHP

[![Latest Stable Version](https://camo.githubusercontent.com/760c1529cdd1463bfb0f7d12bf15ef707a19c67573a30d10f2fa59b41befc4bf/68747470733a2f2f706f7365722e707567782e6f72672f64617674757231392f74757269626f742f762f737461626c65)](https://packagist.org/packages/davtur19/turibot)[![Total Downloads](https://camo.githubusercontent.com/4a1f5a87171539d27d17b71afb907021e34260a0a51ee79a27f31316fa640c06/68747470733a2f2f706f7365722e707567782e6f72672f64617674757231392f74757269626f742f646f776e6c6f616473)](https://packagist.org/packages/davtur19/turibot)[![License](https://camo.githubusercontent.com/62865efcb898a3c76de20d954195d8d73995ac73346a721cd23beb43aacc5f17/68747470733a2f2f706f7365722e707567782e6f72672f64617674757231392f74757269626f742f6c6963656e7365)](https://packagist.org/packages/davtur19/turibot)

Requirements
------------

[](#requirements)

### Stable

[](#stable)

PHP 8.0 or higher with curl extension

### Beta (Async)

[](#beta-async)

PHP 8.1 or higher, you need to install amp from composer

Installation
------------

[](#installation)

### Stable

[](#stable-1)

```
composer require davtur19/turibot 1.x
```

### Beta (Async)

[](#beta-async-1)

```
composer init --name=your.name/yourbot --no-interaction
composer config minimum-stability dev
composer require davtur19/turibot 2.x
```

### Webhook

[](#webhook)

Setup recommended: open [setupWebhook.php](https://github.com/davtur19/TuriBot/blob/master/examples/setupWebhook.php) in your browser and follow the setup wizard.

Manual setup: set webhook to the file [webhook.php](https://github.com/davtur19/TuriBot/blob/master/examples/webhook.php), and as parameter GET "api" set your token.

Example for manual setup:

```
curl https://api.telegram.org/botTOKEN/setWebhook?url=https://WEBSITE/DIR/webhook.php?api=TOKEN
```

Alternatively if you don't want to use GET, just change [this piece of code](https://github.com/davtur19/TuriBot/blob/master/examples/webhook.php#L8-L12).

### GetUpdates

[](#getupdates)

[Setup Token](https://github.com/davtur19/TuriBot/blob/master/examples/getUpdates.php#L8)

Usage
-----

[](#usage)

- Look at the examples ([webhook.php](https://github.com/davtur19/TuriBot/blob/master/examples/webhook.php) and [getUpdates.php](https://github.com/davtur19/TuriBot/blob/master/examples/getUpdates.php)), it's very simple if you know PHP and OOP
- All methods have the parameters in the same order as the [BotAPIs](https://core.telegram.org/bots/api#available-methods)
- The `reply_markup`, `permissions`, `commands`, `entities` and parameters that require arrays, already have a json\_encode in the functions, you just need to pass arrays

Security
--------

[](#security)

[https://github.com/php-telegram-bot/core/wiki/Securing-&amp;-Hardening-your-Telegram-Bot](https://github.com/php-telegram-bot/core/wiki/Securing-&-Hardening-your-Telegram-Bot)

Custom endpoint
---------------

[](#custom-endpoint)

With the Bot API 5.0 it is now possible to [self host your own Bot API](https://core.telegram.org/bots/api#using-a-local-bot-api-server), here is an example of how to add your own endpoint

```
//token, json_payload, endpoint
$client = new Client("1234:AAbbccdd", false, "http://endpoint/bot");
```

Json payload
------------

[](#json-payload)

Only works with webhooks, for more info:

I do not recommend using it as it may need a particular configuration to the webserver for flushing and you cannot get a response from the Bot API

Generator
---------

[](#generator)

Contributors
------------

[](#contributors)

- [andrew-ld](https://github.com/andrew-ld)

Old version
-----------

[](#old-version)

I don't recommend its use, but it could be useful for those unfamiliar with OOP and would like to start learning how PHP and Telegram Bot Api work.

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance52

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community18

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~35 days

Recently: every ~17 days

Total

64

Last Release

334d ago

Major Versions

1.30 → 2.122024-10-06

1.31 → 2.132025-04-01

1.32 → 2.142025-04-11

1.33 → 2.152025-05-13

1.34 → 2.162025-06-18

PHP version history (4 changes)1.0.0PHP ^7.1

1.8PHP ^7.1 | ^8

2.0PHP ^8.1

1.26.1PHP ^8

### Community

Maintainers

![](https://www.gravatar.com/avatar/c80567e21df1f54695b4182bcfc3d75acfa7123f67c16c83eeedb13906db8a3c?d=identicon)[davtur19](/maintainers/davtur19)

---

Top Contributors

[![davtur19](https://avatars.githubusercontent.com/u/13476215?v=4)](https://github.com/davtur19 "davtur19 (83 commits)")[![mrbeandev](https://avatars.githubusercontent.com/u/34623886?v=4)](https://github.com/mrbeandev "mrbeandev (5 commits)")[![lausek](https://avatars.githubusercontent.com/u/32076279?v=4)](https://github.com/lausek "lausek (1 commits)")

---

Tags

botphptelegramtelegram-apitelegram-bot

### Embed Badge

![Health badge](/badges/davtur19-turibot/health.svg)

```
[![Health](https://phpackages.com/badges/davtur19-turibot/health.svg)](https://phpackages.com/packages/davtur19-turibot)
```

###  Alternatives

[danog/madelineproto

Async PHP client API for the telegram MTProto protocol.

3.4k855.0k18](/packages/danog-madelineproto)[amphp/websocket-client

Async WebSocket client for PHP based on Amp.

1623.0M39](/packages/amphp-websocket-client)[amphp/http-tunnel

HTTP/1.1 CONNECT tunnel connector built on the Amp concurrency framework

13900.4k8](/packages/amphp-http-tunnel)[amphp/http-client-cookies

Automatic cookie handling for Amp's HTTP client.

14750.8k12](/packages/amphp-http-client-cookies)[amphp/http-server-static-content

Static content request handler for Amp's HTTP server.

2167.2k12](/packages/amphp-http-server-static-content)[amphp/http-client-psr7

PSR-7 adapter for Amp's HTTP client.

1454.7k4](/packages/amphp-http-client-psr7)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
