bazzastyle / bazzabot
A simple way to communicate with Telegram APIs in PHP.
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.4
- ext-json: *
- amphp/file: ^v3.0@dev
- amphp/http-client: ^v5.0@dev
This package is auto-updated.
Last update: 2025-07-03 21:22:54 UTC
README
BazzaBot is a simple way to communicate with Telegram APIs in PHP
Requirements
PHP 8.4 or higher
From composer: amphp/http-client 5.0 amphp/file 3.0
Installation
composer require bazzastyle/bazzabot
- Copy the example folder outside the vendor folder and rename it as you wish.
- Rename env-sample.php to env.php
Environment
Set the required values in the env.php file
Webhook
Open setupWebhook.php in your browser and follow the setup wizard.
GetUpdates
Usage
- Look at the examples (webhook.php and getUpdates.php), it's very simple if you know PHP and OOP
- All methods have the parameters in the same order as the BotAPIs
Custom endpoint
With the Bot API 5.0 it is now possible to self host your own Bot API, here is an example of how to add your own endpoint
Json payload
Only works with webhooks, for more info: https://core.telegram.org/bots/faq#how-can-i-make-requests-in-response-to-updates
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