---
title: "WT Max platform - Joomla library for integration with messenger via API - WebTolk websites development, Joomla Extensions"
description: "Joomla is a library for the MAX messenger API with a system plugin for connection settings and diagnostics."
url: "https://web-tolk.ru/en/dev/biblioteki/wt-max-platform"
date: "2026-06-09T09:14:50+00:00"
language: "en-GB"
---

# WT Max integration library for Joomla

- **Category:** [Libraries](https://web-tolk.ru/en/dev/biblioteki)
- **Version:** 0.1.1
- **Date:** 02 June 2026

631 397 CTR 159% Pack Free

[Download](https://web-tolk.ru/en/get?element=lib_wtmax)[Versions](https://web-tolk.ru/en/dev/biblioteki/wt-max-platform/versions)[Documentation](https://github.com/WebTolk/Max-platform-PHP-SDK/blob/main/docs/README.md)[GitHub](https://github.com/WebTolk/WT-Max-Joomla-library)

MAX API Joomla library with a system plugin for configuration and connection diagnostics.

![WT Max integration library for Joomla](https://web-tolk.ru/images/swjprojects/projects/113/en-GB/icon.webp)

## Description

Joomla package that installs:

- the `WebTolk/Wtmax` library
- the `System - WT Max` system plugin

The package wraps the main `webtolk/max` SDK and provides a ready entry point `\Webtolk\Wtmax\Wtmax::getInstance()`. The bot token and service settings are stored in the system plugin.

Main SDK repository: [https://github.com/WebTolk/Max-platform-PHP-SDK](https://github.com/WebTolk/Max-platform-PHP-SDK)

## Package contents

- Joomla library `Webtolk/Wtmax`
- system plugin for storing the token
- API connection status field
- separate file logging option

## How it works

After installation:

1. enable the `System - WT Max` plugin
2. enter the `MAX bot token`
3. enable separate file logging if needed
4. in Joomla code, get the ready SDK via `Wtmax::getInstance()`

Internally, the library creates:

- `Joomla\Http\HttpFactory`
- `Laminas\Diactoros\RequestFactory`
- `Laminas\Diactoros\StreamFactory`
- a PSR-3 logger from Joomla core

## Quick start

### Get a ready SDK instance

```
<?php

declare(strict_types=1);

use Webtolk\Wtmax\Wtmax;

defined('_JEXEC') or die;

$max = Wtmax::getInstance();

$bot = $max->bots()->me();

echo $bot->getId();
echo $bot->getUsername();
```

### Send a message to a chat

The example is based on the upstream `messages()->sendToChat()` flow.

```
<?php

declare(strict_types=1);

use Webtolk\Max\Payload\NewMessageBody;
use Webtolk\Wtmax\Wtmax;

defined('_JEXEC') or die;

$chatId = 123456;

$message = Wtmax::getInstance()->messages()->sendToChat(
	$chatId,
	NewMessageBody::text('Hello from Joomla WT Max library')
);

echo $message->getBody()?->getText() ?? '';
```

### Send an image

The example is based on the upstream upload flow: `uploads()->upload()` + `toAttachment()` + `messages()->sendToChat()`.

```
<?php

declare(strict_types=1);

use Webtolk\Max\Payload\NewMessageBody;
use Webtolk\Max\Payload\UploadType;
use Webtolk\Wtmax\Wtmax;
use RuntimeException;

defined('_JEXEC') or die;

$chatId = 123456;
$imagePath = JPATH_ROOT . '/images/sample.jpg';
$binaryImage = file_get_contents($imagePath);

if ($binaryImage === false)
{
	throw new RuntimeException('Image file was not read: ' . $imagePath);
}

$max = Wtmax::getInstance();

$imageAttachment = $max->uploads()
	->upload(UploadType::IMAGE, $binaryImage, 'image/jpeg')
	->toAttachment();

$message = $max->messages()->sendToChat(
	$chatId,
	NewMessageBody::text('Sending an image from Joomla')
		->withAttachments([$imageAttachment])
);

echo $message->getBody()?->getMessageId() ?? '';
```

### Handle a callback and answer it

The example is based on the upstream `messages()->answerCallback()` flow.

```
<?php

declare(strict_types=1);

use Webtolk\Max\Payload\CallbackAnswerPayload;
use Webtolk\Wtmax\Wtmax;

defined('_JEXEC') or die;

$payload = file_get_contents('php://input');

if ($payload !== false && $payload !== '')
{
	$update = json_decode($payload, true, 512, JSON_THROW_ON_ERROR);
	$callbackId = $update['callback']['callback_id'] ?? null;

	if ($callbackId !== null)
	{
		Wtmax::getInstance()->messages()->answerCallback(
			(string) $callbackId,
			(new CallbackAnswerPayload())->withNotification('Button processed')
		);
	}
}
```

## If you need a manual Max instance

`Wtmax::getInstance()` is convenient for typical Joomla usage, but you can also assemble the SDK manually if needed.

```
<?php

declare(strict_types=1);

require_once JPATH_LIBRARIES . '/Webtolk/Wtmax/src/libraries/vendor/autoload.php';

use Joomla\Http\HttpFactory;
use Laminas\Diactoros\RequestFactory;
use Laminas\Diactoros\StreamFactory;
use Webtolk\Max\Config\MaxConfig;
use Webtolk\Max\Max;
use Psr\Log\NullLogger;

defined('_JEXEC') or die;

$token = 'YOUR_BOT_TOKEN';

$max = new Max(
	new MaxConfig($token),
	new NullLogger()
);

$max->setTransport(
	(new HttpFactory())->getHttp([], ['curl', 'stream']),
	new RequestFactory(),
	new StreamFactory(),
);
```

## Where the token is stored

The token is stored in the parameters of the `System - WT Max` system plugin.

Main parameters:

- `MAX bot token`
- `Log to a separate file`
- `Custom log file`

## Logging

If logging is enabled, the library writes to a separate file:

```
/logs/wtmax.max-api.log
```

## Joomla

 **Extension type:** Package **Package composition:** Library, Plugin **Joomla version:** 6.1.0, 6.1.1

## Gallery

![...](https://web-tolk.ru/en/dev/biblioteki/images/swjprojects/projects/113/en-GB/gallery/RfjMVgBcDTe.webp)

![...](https://web-tolk.ru/en/dev/biblioteki/images/swjprojects/projects/113/en-GB/gallery/u37uPTIiTt6.webp)

## What's new

 2026-06-02 19:06:20

Addition

### Sending messages to Max via the onWtmaxSendMessage trigger

Added the onWtmaxSendMessage event to send messages from third-party Joomla extensions to the default chat.

Addition

### The default chat for sending messages

Added the default chat_id setting for outgoing messages (MAX chat selection via Joomla ModalSelect). The plugin shows information about this chat_id.

Addition

### Log of outgoing messages

The outgoing message log has been added to the plugin table #__plg_system_wtmax_messages.

Addition

### Central processing of incoming webhooks

Added central processing of incoming webhooks from MAX bots. The central processing of webhooks triggers the onWtmaxIncomingWebhook event for system plugins and plugins of the wtmax group

Change

### Updating the PHP SDK Max

The PHP SDK Max has been updated to version 0.1.1.

## JSON-LD Schema

```json
{
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17",
    "itemListElement": [
        {
            "@type": "ListItem",
            "position": 1,
            "item": {
                "@id": "https://web-tolk.ru/en",
                "name": "Home"
            }
        },
        {
            "@type": "ListItem",
            "position": 2,
            "item": {
                "@id": "https://web-tolk.ru/en/dev",
                "name": "Joomla extensions"
            }
        },
        {
            "@type": "ListItem",
            "position": 3,
            "item": {
                "@id": "/en/dev/biblioteki",
                "name": "Libraries"
            }
        },
        {
            "@type": "ListItem",
            "position": 4,
            "item": {
                "name": "WT Max integration library for Joomla"
            }
        }
    ]
}
```

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Organization",
            "@id": "https://web-tolk.ru/#/schema/Organization/base",
            "name": "WebTolk",
            "url": "https://web-tolk.ru/",
            "logo": {
                "@type": "ImageObject",
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo",
                "url": "images/webtolk-1080p.jpg",
                "contentUrl": "images/webtolk-1080p.jpg",
                "width": 1920,
                "height": 1080
            },
            "image": {
                "@id": "https://web-tolk.ru/#/schema/ImageObject/logo"
            },
            "sameAs": [
                "https://github.com/WebTolk",
                "https://github.com/sergeytolkachyov",
                "https://vk.com/web_tolk",
                "https://vk.com/webtolkru",
                "https://tenchat.ru/sergeytolkachyov",
                "https://t.me/sergeytolkachyov",
                "https://t.me/webtolkru"
            ]
        },
        {
            "@type": "WebSite",
            "@id": "https://web-tolk.ru/#/schema/WebSite/base",
            "url": "https://web-tolk.ru/",
            "name": "WebTolk websites development, Joomla Extensions",
            "publisher": {
                "@id": "https://web-tolk.ru/#/schema/Organization/base"
            }
        },
        {
            "@type": "WebPage",
            "@id": "https://web-tolk.ru/#/schema/WebPage/base",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-max-platform",
            "name": "WT Max platform - Joomla library for integration with messenger via API - WebTolk websites development, Joomla Extensions",
            "description": "Joomla is a library for the MAX messenger API with a system plugin for connection settings and diagnostics.",
            "isPartOf": {
                "@id": "https://web-tolk.ru/#/schema/WebSite/base"
            },
            "about": {
                "@id": "https://web-tolk.ru/#/schema/SoftwareApplication/base"
            },
            "inLanguage": "en-GB",
            "breadcrumb": {
                "@id": "https://web-tolk.ru/#/schema/BreadcrumbList/17"
            }
        },
        {
            "@type": "SoftwareApplication",
            "name": "WT Max integration library for Joomla",
            "url": "https://web-tolk.ru/en/dev/biblioteki/wt-max-platform",
            "description": "MAX API Joomla library with a system plugin for configuration and connection diagnostics.",
            "applicationCategory": "Libraries",
            "softwareVersion": "0.1.1",
            "downloadUrl": "https://web-tolk.ru/en/get?element=lib_wtmax",
            "image": "https://web-tolk.ru/images/swjprojects/projects/113/en-GB/icon.webp",
            "operatingSystem": "ANY",
            "interactionStatistic": [
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/DownloadAction",
                    "userInteractionCount": 631
                },
                {
                    "@type": "InteractionCounter",
                    "interactionType": "https://schema.org/ViewAction",
                    "userInteractionCount": 398
                }
            ],
            "mainEntityOfPage": {
                "@type": "WebPage",
                "url": "https://web-tolk.ru/en/dev/biblioteki/wt-max-platform"
            },
            "softwareRequirements": "Joomla",
            "applicationSubCategory": "0.1.1",
            "isAccessibleForFree": true
        }
    ]
}
```
