Download the PHP package zerexei/botman-drivers without Composer
On this page you can find all versions of the php package zerexei/botman-drivers. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zerexei/botman-drivers
More information about zerexei/botman-drivers
Files in zerexei/botman-drivers
Package botman-drivers
Short Description Custom BotMan driver collection for Messenger, WhatsApp Cloud API, Viber, and a local web playground.
License MIT
Informations about the package botman-drivers
Overview
A collection of custom BotMan drivers that connect your PHP chatbot to multiple messaging platforms. Each driver follows the BotMan HttpDriver contract and comes with typed message template builders.
Also includes a local web playground (frosted-glass UI + PHP dev server) so you can develop and test your bot without a tunnel or real webhook.
Getting Started
1. Clone and install
2. Configure credentials
Open .env and fill in the tokens for the platforms you use:
| Variable | Platform | Where to get it |
|---|---|---|
MESSENGER_ACCESS_TOKEN |
Messenger | Meta App → Messenger → Access Tokens |
WHATSAPP_ACCESS_TOKEN |
Meta App → WhatsApp → API Setup | |
WHATSAPP_VERIFY_TOKEN |
A secret string you register in the Meta webhook dashboard | |
VIBER_ACCESS_TOKEN |
Viber | partners.viber.com |
VIBER_SENDER_NAME |
Viber | Display name shown to users (e.g. Support Bot) |
VIBER_SENDER_AVATAR |
Viber | Public URL of your bot's avatar (optional) |
3. Run the local playground
Open http://localhost:8000. The frosted-glass chat UI talks to the Web driver. No credentials or tunnel needed.
Integration
Embed in an existing PHP project
Copy the Drivers/ folder into your project root and add the PSR-4 mapping to your composer.json:
Register drivers
Call DriverManager::loadDriver() before creating the BotMan instance:
Customize a controller
Each controller exposes a registerHandlers(BotMan $bot) method for your bot logic. Extend the provided controller instead of editing it directly so you keep upstream bug fixes:
Then register your controller in server.php:
Message Templates
Typed builder classes for platform-specific message formats — no raw arrays needed.
Messenger
Button Template
Quick Replies
Generic (Carousel) Template
Image
Text
Image
Interactive List (Button Template)
Viber
Text
Image
Button Keyboard
Rich Media (Carousel)
Building a New Driver
Copy Drivers/Template/ and rename the files and namespace to match your platform:
The scaffold includes three files:
| File | What to implement |
|---|---|
TemplateDriver.php |
buildPayload, matchesRequest, getMessages, buildServicePayload, sendPayload, isConfigured |
TemplateController.php |
Self-contained webhook entry point (intentionally does not extend BaseController) |
MessageTemplates/TextTemplate.php |
Starting point for message builders |
Supported Platforms
| Platform | Driver | API Reference |
|---|---|---|
| 🌐 Web (playground) | botman/driver-web |
— |
| 💬 Messenger | Drivers\Messenger\MessengerDriver |
Messenger Platform |
Drivers\WhatsApp\WhatsAppDriver |
WhatsApp Cloud API | |
| 📲 Viber | Drivers\Viber\ViberDriver |
Viber Bot API |
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
Security
To report a security vulnerability, contact: 📧 Angelo Arcillas — [email protected]
All versions of botman-drivers with dependencies
botman/botman Version ^2.8
botman/driver-web Version ^1.5
illuminate/http Version ^12.35