Standalone two-way integration between Live Helper Chat and Max Messenger.
- Incoming Max messages through an LHC incoming webhook.
- Operator and bot text delivery through the configured LHC REST API action.
- Native three-step media delivery: create an upload session, upload the local file, then send a message with the returned token.
- Reply synchronization through Max message IDs, including native media replies.
- One-click creation or update of the incoming webhook and the optional REST action used for typing indicators.
- No Live Helper Chat core changes required.
Clone the extension into the LHC extension directory:
cd /path/to/livehelperchat/lhc_web/extension
git clone https://github.com/LiveHelperChat/lhcmax.git lhcmax
Enable it in lhc_web/settings/settings.ini.php:
'extensions' => array(
'lhcmax',
)
Then open /index.php/site_admin/max/settings:
- Enter the Max API host and bot token.
- Leave the fallback department ID at 0 when the webhook scope is max.
- Save and activate the Max configuration.
- Register the displayed callback URL in the Max bot settings.
The bot token is stored only in the ignored local settings/settings.ini.php file and in the installed LHC REST configuration. The repository template intentionally contains no token.
Max visitor -> LHC incoming webhook -> LHC chat.
Text and interactive actions use the configured LHC REST API action. The
lhcmax listener handles media only: POST /uploads, the returned multipart
endpoint, and then POST /messages. This separation prevents duplicate text
delivery while keeping the three-step upload independent of the REST worker.
Run the dependency-free contract harness with PHP:
php tests/MaxContractTest.php
Apache-2.0 or MIT.