gupalo / beeperbz-client
PHP client for sending plain and rich messages to a beeperbz server
Requires
- php: >=8.4
- psr/log: ^3.0
- symfony/http-client: ^7.4 || ^8.0
Requires (Dev)
- monolog/monolog: ^3.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^13.0
- psr/simple-cache: ^3.0
Suggests
- monolog/monolog: ^3.0, for Monolog\BeeperbzHandler (log alerts to chat)
- psr/simple-cache: ^3.0, for sharing Monolog\BeeperbzHandler repeat suppression across processes
Provides
None
Conflicts
None
Replaces
None
README
PHP client for sending plain and rich messages through a beeperbz server's /bz/{token} endpoint.
The server delivers them to Slack (Block Kit) or Telegram (HTML + inline keyboard) depending on the
token; the client never knows which.
Requirements
- PHP 8.4+
symfony/http-client(^7.4 || ^8.0),psr/log
Installation
composer require gupalo/beeperbz-client
Usage
use Gupalo\BeeperbzClient\BeeperbzClient; $client = BeeperbzClient::create('https://beeperbz.example.com'); $token = 'tXXXXXXXXX';
create($baseUrl, ?$logger = null, ?$httpClient = null) builds the transport for you. Without
$httpClient it uses a Symfony client with a 15 s timeout (BeeperbzClient::DEFAULT_TIMEOUT), no
retries, and no logger of its own, so Symfony never logs the token URL. Pass your own client for
retries or other options, or wire it by hand:
use Gupalo\BeeperbzClient\HttpTransport; use Symfony\Component\HttpClient\HttpClient; $client = new BeeperbzClient(new HttpTransport(HttpClient::create(['timeout' => 15]), 'https://beeperbz.example.com', $logger));
There is no default base URL. Every call is a POST; the text goes in the body, never in the URL.
Plain text
Sent as-is (Slack mrkdwn / Telegram HTML pass through).
$client->send($token, 'Deploy finished');
Rich markup
sendRich() sends format=rich; the server parses the line syntax:
$client->sendRich($token, <<<'RICH' # Deploy finished Service:: api Version:: 1.4.2 --- All checks **green** -# by CI [Logs](https://example.com/logs){button} [Rollback](https://example.com/rollback){button danger} RICH);
| Line | Result |
|---|---|
# Header |
header |
Key:: value |
field |
--- |
divider |
-# small text |
context |
 |
image |
[Label](https://url){button} |
link button (primary / danger) |
Inline text uses standard Markdown (**b**, *i*, ~~s~~, `c`, [t](url)). Pass
InlineSyntax::Mrkdwn as the third argument to use raw Slack mrkdwn instead.
The server only turns http(s) URLs without whitespace or control characters into buttons and images;
anything else is shown as Label: url text.
Escaping user text
Text you embed in markup is parsed as markup: a * in a user name becomes formatting, a line starting
with # becomes a header. Pass untrusted text through Markup::escape() to show it as written:
use Gupalo\BeeperbzClient\Markup; use Gupalo\BeeperbzClient\Message; $client->sendRich($token, "# Deploy finished\nBy:: " . Markup::escape($user) . "\n" . Markup::escape($commitMessage)); $client->sendMessage($token, Message::create()->section('Comment: ' . Markup::escape($comment)));
It backslash-escapes every ASCII punctuation character (!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~), the
exact set the server unescapes (needs a beeperbz server with escape support). Escape each piece once,
and only with the default InlineSyntax::Markdown: with InlineSyntax::Mrkdwn, and inside code spans
or fenced code, backslashes are shown as written.
JSON message builder
Message is an immutable fluent builder that serialises to the server's JSON block schema:
use Gupalo\BeeperbzClient\Block\Button; use Gupalo\BeeperbzClient\ButtonStyle; use Gupalo\BeeperbzClient\InlineSyntax; use Gupalo\BeeperbzClient\Message; $client->sendMessage($token, Message::create() ->header('Deploy finished') ->fields(['Service' => 'api', 'Version' => '1.4.2']) ->divider() ->section('All checks **green**') ->context('by CI') ->image('https://example.com/graph.png', 'graph') ->buttons( Button::link('Logs', 'https://example.com/logs'), Button::link('Open', 'https://example.com', ButtonStyle::Primary), ) ->fallbackText('Deploy finished'));
Use ->inline(InlineSyntax::Mrkdwn) to switch inline syntax.
Action buttons
Besides link buttons, a button can carry an action. Needs a beeperbz server with action-button support.
use Gupalo\BeeperbzClient\Block\Button; use Gupalo\BeeperbzClient\ButtonStyle; use Gupalo\BeeperbzClient\Message; use Gupalo\BeeperbzClient\SnoozePeriod; $client->sendMessage($token, Message::create() ->header('Disk almost full') ->buttons( Button::ack(), Button::snooze(SnoozePeriod::OneHour), Button::reply(), Button::app('Restart worker', 'restart:worker-1', ButtonStyle::Danger), Button::link('Logs', 'https://beeperbz.example.com/logs'), ) ->fallbackText('Disk almost full'));
| Constructor | Ref | Default label | Effect |
|---|---|---|---|
Button::ack($text = 'Ack', $style = null) |
bz:ack |
Ack |
Acknowledges the message |
Button::snooze(SnoozePeriod $period, $text = null, $style = null) |
bz:snooze:1h / bz:snooze:24h |
Snooze 1h / Snooze 24h |
Holds the token's messages for that long |
Button::reply($text = 'Reply', $style = null) |
bz:reply |
Reply |
Slack only: opens a modal, the text is posted as a thread reply. Dropped on Telegram |
Button::app($text, $payload, $style = null) |
app:<payload> |
the payload | Signed POST to the token's callback URL |
SnoozePeriod has OneHour (1h) and OneDay (24h). An empty or blank label falls back to the
default. An app: payload is an identifier of 1-64 characters from A-Z a-z 0-9 . _ : -; anything
else throws \InvalidArgumentException.
The server renders an invalid ref, or an app: button on a token without a callback URL, as plain
label text. Ack and app buttons are decisive: the first decisive click wins, then the action buttons
disappear (link buttons stay) and the message gets a status line. Set the callback URL and secret in
the beeperbz admin (see Handling app callbacks).
For sendRich, Button::toMarkup() gives the rich-markup form, such as [Ack](bz:ack){button} or
[Restart worker](app:restart:worker-1){button danger}. Link URLs are percent-encoded for markup
delimiters, and whitespace in the label (newlines included) collapses to one space. The label escaping
assumes InlineSyntax::Markdown (the default); with Mrkdwn the server keeps the backslashes.
The callback label is the plain text the clicker saw, whether the button was sent as markup or JSON.
Async sending
sendAsync(), sendRichAsync() and sendMessageAsync() (on BeeperbzClient, not on the interface)
start the request and return a PendingSend straight away. wait() reads the result and throws the
same exceptions as the blocking methods. Start several before waiting and they overlap:
$a = $client->sendAsync($token, 'Deploy started'); $b = $client->sendAsync($otherToken, 'Deploy started'); $a->wait(); $b->wait(); // throws RateLimitedException / TransportException on failure
Failures are logged once, at warning, by the transport. A PendingSend that is never waited on is
checked when it is destroyed: a failure is logged and is not thrown.
There is no fire-and-forget. Keep the handle and call wait() later. A discarded handle, such as
$client->sendAsync($token, 'x'); as a bare statement, is destroyed at once, and its destructor
waits for the response right there, so the call blocks like send(). To send after the response has
gone to the user, use the deferred client below.
Argument errors are thrown by sendAsync() itself, not by wait(): an \InvalidArgumentException
for an empty or dot-segment token, an invalid base URL or a payload that cannot be encoded. A
transport failure that the HTTP client reports while starting the request (for example a host
blocked by NoPrivateNetworkHttpClient) is also thrown by sendAsync(), as a TransportException.
Concurrent sends can reach the chat out of order. Where order matters, use the blocking methods or wait for one send before starting the next.
Deferred client
DeferredBeeperbzClient implements BeeperbzClientInterface, so it can replace the client where
notifications must not slow the response. It queues every send and fires them together on flush().
Wrap a plain BeeperbzClient and the requests overlap.
use Gupalo\BeeperbzClient\DeferredBeeperbzClient; use Gupalo\BeeperbzClient\Exception\DeferredSendException; $deferred = new DeferredBeeperbzClient(BeeperbzClient::create('https://beeperbz.example.com')); $deferred->send($token, 'one'); $deferred->send($token, 'two'); try { $deferred->flush(); } catch (DeferredSendException $e) { foreach ($e->getFailures() as $failure) { // every queued send was attempted; these are the ones that failed } }
flush() always attempts every queued send, then throws one DeferredSendException (a
BeeperbzException). count($deferred) is the number of queued sends. reset() flushes too, for
long-running runtimes between jobs, but never throws: it swallows DeferredSendException, whose
failures the transport has already logged. The sends overlap, so they can
reach the chat out of order; send directly with BeeperbzClient where order matters.
The deferred client has no logger. Its destructor flushes what is left and swallows
DeferredSendException, so call flush() explicitly. In Symfony, flush after the response is sent:
use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\HttpKernel\KernelEvents; final readonly class FlushBeeperbz { public function __construct(private DeferredBeeperbzClient $beeperbz) { } #[AsEventListener(KernelEvents::TERMINATE)] public function onTerminate(): void { $this->beeperbz->flush(); } }
Register the services explicitly. Pass the inner client to the deferred one by its id: if you alias
BeeperbzClientInterface to the deferred client, autowiring would otherwise inject the deferred client
into itself (a circular reference).
services: Gupalo\BeeperbzClient\BeeperbzClient: factory: [Gupalo\BeeperbzClient\BeeperbzClient, create] arguments: $baseUrl: '%env(BEEPERBZ_BASE_URL)%' $logger: '@?logger' # optional Gupalo\BeeperbzClient\DeferredBeeperbzClient: arguments: $client: '@Gupalo\BeeperbzClient\BeeperbzClient' # optional: type-hint the interface and get the deferred client Gupalo\BeeperbzClient\BeeperbzClientInterface: '@Gupalo\BeeperbzClient\DeferredBeeperbzClient'
For console commands, listen to console.terminate the same way:
use Symfony\Component\Console\ConsoleEvents; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; final readonly class FlushBeeperbzOnConsoleTerminate { public function __construct(private DeferredBeeperbzClient $beeperbz) { } #[AsEventListener(ConsoleEvents::TERMINATE)] public function onTerminate(): void { $this->beeperbz->flush(); } }
kernel.terminate and console.terminate do not fire per message in a long-running worker
(messenger:consume, RoadRunner or FrankenPHP worker mode), so the queue would only go out when the
worker stops. Flush after every Messenger message. Messenger dispatches these events outside its
handler error handling, so a listener that throws would stop messenger:consume; catch the failure:
use Gupalo\BeeperbzClient\Exception\DeferredSendException; use Symfony\Component\EventDispatcher\Attribute\AsEventListener; use Symfony\Component\Messenger\Event\WorkerMessageFailedEvent; use Symfony\Component\Messenger\Event\WorkerMessageHandledEvent; final readonly class FlushBeeperbzAfterMessage { public function __construct(private DeferredBeeperbzClient $beeperbz) { } #[AsEventListener(WorkerMessageHandledEvent::class)] #[AsEventListener(WorkerMessageFailedEvent::class)] public function onMessage(): void { try { $this->beeperbz->flush(); } catch (DeferredSendException) { // already logged by the transport } } }
Or tag the service with kernel.reset and Symfony's services resetter calls reset() (which
flushes) between messages and, in worker mode, between requests. reset() never throws, so the tag
is safe: a beeperbz outage cannot stop the worker.
services: Gupalo\BeeperbzClient\DeferredBeeperbzClient: arguments: $client: '@Gupalo\BeeperbzClient\BeeperbzClient' tags: - { name: kernel.reset, method: reset }
Monolog handler
Gupalo\BeeperbzClient\Monolog\BeeperbzHandler sends log records as a message. Monolog is optional:
run composer require monolog/monolog if it is not installed already.
use Gupalo\BeeperbzClient\BeeperbzClient; use Gupalo\BeeperbzClient\Monolog\BeeperbzHandler; use Monolog\Logger; $logger = new Logger('app'); $logger->pushHandler(new BeeperbzHandler( BeeperbzClient::create('https://beeperbz.example.com'), 'tXXXXXXXXX', ));
Symfony, config/packages/monolog.yaml and config/services.yaml:
monolog: handlers: beeperbz: type: service id: app.monolog.beeperbz_handler
services: app.monolog.beeperbz_handler: class: Gupalo\BeeperbzClient\Monolog\BeeperbzHandler arguments: $client: '@Gupalo\BeeperbzClient\BeeperbzClient' $token: '%env(BEEPERBZ_ALERTS_TOKEN)%'
$client is set explicitly to the plain BeeperbzClient service (registered with the create
factory, as in the deferred client section above), so it does not pick up a DeferredBeeperbzClient
that the interface may be aliased to.
Behaviour:
- The default level is
Error. Pass a level as the third argument to change it. - The handler buffers records and sends one message per flush, close or reset. Under PHP-FPM it
sends at the end of the request, from
close()or its destructor at shutdown.reset()is only called by Symfony's services resetter in long-running runtimes (Messenger workers, RoadRunner or FrankenPHP worker mode), between messages or requests. - PSR-3 placeholders such as
{class}are filled in from the record context. Invalid UTF-8 is replaced, and each record line is cut to 500 characters, so one bad record cannot stop the alert. - A message carries at most 10 records (
$maxRecords) plus a+N moreline. - Record text goes into fenced code blocks, kept as written. The header (unless you pass
$title) and theChannelfield are log text too, so they are escaped withMarkup::escape(). A$titleis used as written, so it may contain markup. Long batches are split into several code blocks of at most 2 900 Slack characters each, so the server never cuts a block in the middle. - Send failures are swallowed silently: an alert must never break the application or log back into the handler.
- Use a plain
BeeperbzClientwith it, not aDeferredBeeperbzClient. The handler sends once per flush, so there is nothing to batch, and a deferred client would hold the message until someone callsflush().
Spam guard
Repeats are grouped and, within a time window, suppressed, so a loop or 50 requests hitting the same error produce one chat message, not 50.
- Records with the same channel, level, message template (before
{placeholders}are filled in) and exception class plusfile:lineare one group. The message shows one line per group with a(×N)suffix. Grouping is always on.Recordsis the number of records in the message (suppressed repeats are not counted). Grouping uses the message as the handler receives it: a logger-levelPsrLogMessageProcessorinterpolates earlier, so{id}variants then become separate groups. - A group already sent within
$dedupeTtlseconds (default 300) is not sent again. Its repeats are counted and reported on the next send after the window as(+S repeats suppressed). If the error never comes back, that count is never reported. If every group is suppressed, nothing is sent, unless records beyond$maxRecordsare waiting: those still go out as "N more log records". dedupeTtl: 0turns suppression off (grouping stays).- Suppression lives in the handler instance by default, so it only works inside one long-running
process. For PHP-FPM, pass any PSR-16 cache (
composer require psr/simple-cacheplus an implementation) to share the window across requests. Keys are hashed with the token, so apps or tokens sharing a cache never suppress each other, and the token is never stored. - Only the first
$maxRecordsdistinct groups per flush are tracked; the rest are counted in+N moreand are not suppressed. - Counts across processes are approximate: PSR-16 get/set is not atomic, so concurrent processes can under-count repeats.
- A cache that throws or returns unexpected data is ignored: the record is sent as if there were no cache.
- A send counts as sent when
sendMessage()returns. With aDeferredBeeperbzClientthat only means it was queued, so a later failure still starts a quiet window. Use a plainBeeperbzClienthere.
$logger->pushHandler(new BeeperbzHandler( BeeperbzClient::create('https://beeperbz.example.com'), 'tXXXXXXXXX', cache: $psr16Cache, dedupeTtl: 600, ));
Symfony: cache.app is a PSR-6 pool, so wrap it in Symfony\Component\Cache\Psr16Cache (from
symfony/cache) and pass that as $cache:
services: app.beeperbz_cache: class: Symfony\Component\Cache\Psr16Cache arguments: ['@cache.app'] app.monolog.beeperbz_handler: class: Gupalo\BeeperbzClient\Monolog\BeeperbzHandler arguments: $client: '@Gupalo\BeeperbzClient\BeeperbzClient' $token: '%env(BEEPERBZ_ALERTS_TOKEN)%' $cache: '@app.beeperbz_cache' $dedupeTtl: 300
Exception alerts
Message::fromThrowable() turns an exception into a ready-made message, for a one-off try/catch:
use Gupalo\BeeperbzClient\Message; try { $importer->run(); } catch (\Throwable $e) { $client->sendMessage($token, Message::fromThrowable($e, 'Import failed')); throw $e; }
The header is $title (used as written), or ShortClass: message (collapsed to one line, cut to 150
characters, escaped with Markup::escape()). Fields: Exception (class), Location (file:line) and
Code when it is not 0, all escaped. The code block holds the message (up to 20 lines plus … N more lines) and the trace (up to 15 lines plus … N more frames). A long one is split into several
self-contained code blocks. Up to 3
previous exceptions are listed as Caused by: lines. Text is scrubbed of invalid UTF-8 and each line
is cut to 500 characters. Traces can contain file paths and argument values, so send them only to a
chat your team may see.
Handling app callbacks
A click on a Button::app() button makes the server POST JSON to the callback URL of the token.
Verify it with CallbackVerifier and the secret from the beeperbz admin (Tokens, edit, Callback; the
secret can be regenerated there). Plain PHP, no framework:
use Gupalo\BeeperbzClient\Callback\ActionCallback; use Gupalo\BeeperbzClient\Callback\CallbackVerifier; use Gupalo\BeeperbzClient\Callback\InvalidCallbackException; use Gupalo\BeeperbzClient\Markup; $verifier = new CallbackVerifier((string) getenv('BEEPERBZ_CALLBACK_SECRET')); // e.g. sXXXXXXXXX try { $callback = $verifier->parse( (string) file_get_contents('php://input'), // the raw body, byte for byte $_SERVER['HTTP_X_BEEPER_TIMESTAMP'] ?? null, $_SERVER['HTTP_X_BEEPER_SIGNATURE'] ?? null, ); } catch (InvalidCallbackException) { http_response_code(401); exit; } if ($callback->action === 'restart:worker-1') { // do the work: fast and idempotent } header('Content-Type: application/json'); echo ActionCallback::reply('Restarted by '.Markup::escape($callback->userName));
parse() returns an ActionCallback with action (the payload), label, messageId, messageText,
platform, userId, userName, tokenName and clickedAt (DateTimeImmutable). It throws
InvalidCallbackException with the message invalid signature, timestamp outside the allowed window
or malformed body: <field>; the message never contains the secret, signature or body. verify()
returns a bool instead. The signature is v1= plus the HMAC-SHA256 of v1:{timestamp}:{rawBody}; the
timestamp must be within $tolerance seconds (default 300) of now. The constructor throws
\InvalidArgumentException for an empty secret or a negative tolerance.
Delivery contract:
- One POST per
app:click that takes the decision (the first decisive click; Ack is decisive but sends nothing), 10 s timeout, never retried: keep the handler fast and idempotent. - Redirects are not followed.
- Any 2xx marks the action done. An optional reply body,
{"text":"..."}(application/json) ortext/plain, is trimmed, cut to 300 characters, may use inline Markdown and replaces the status line. The reply is rendered as inline Markdown: escape untrusted parts (such as the user's display name) withMarkup::escape(). - A non-2xx, a timeout or no response is shown as
outcome unknown (...)and is final. If the URL is unreachable, the buttons come back.
Command line
vendor/bin/beeperbz sends from cron, deploy scripts and CI, with no PHP code:
export BEEPERBZ_URL=https://beeperbz.example.com export BEEPERBZ_TOKEN=tXXXXXXXXX vendor/bin/beeperbz "deploy done" make test 2>&1 | tail -20 | vendor/bin/beeperbz --rich
| Option / variable | Meaning |
|---|---|
BEEPERBZ_URL, --url |
server base URL (the flag wins) |
BEEPERBZ_TOKEN, --token |
token (the flag wins) |
--rich |
send as rich markup (format=rich) |
--mrkdwn |
rich markup with InlineSyntax::Mrkdwn (implies --rich) |
--timeout=SEC |
positive number of seconds (default 15) |
-h, --help |
usage |
The text is the arguments joined by a space. With no arguments, or a single -, it is read from
standard input. Use -- before text that starts with a dash.
Set the token with BEEPERBZ_TOKEN. A --token value is visible to other users of the machine in
ps output and is kept in your shell history, so avoid it on shared hosts.
Exit codes: 0 sent, 1 the send failed (the message goes to stderr, without the token), 2 usage
error (missing URL or token, empty text, unknown option, bad --timeout). Like the library, the CLI
only learns that the server accepted the request, and it does not follow redirects.
Testing your application
Type-hint BeeperbzClientInterface and swap in a double from Gupalo\BeeperbzClient\Testing:
NullBeeperbzClientsends nothing. Also useful where notifications are switched off.InMemoryBeeperbzClientrecords every call;getSent()returnsSentMessageobjects (method,token,text,inline,message) in call order, andreset()clears them.
use Gupalo\BeeperbzClient\Testing\InMemoryBeeperbzClient; use Gupalo\BeeperbzClient\Testing\SentMessage; $beeper = new InMemoryBeeperbzClient(); (new DeployNotifier($beeper))->notify('api'); $sent = $beeper->getSent(); self::assertCount(1, $sent); self::assertSame(SentMessage::SEND_RICH, $sent[0]->method); self::assertStringContainsString('# Deploy finished', (string) $sent[0]->text);
Error handling
| Exception | When |
|---|---|
Exception\RateLimitedException |
HTTP 429 (server per-token rate limit) |
Exception\TransportException |
network errors and any non-2xx response, including 3xx |
Exception\BeeperbzException |
base class of both (extends \RuntimeException) |
\InvalidArgumentException |
unusable token ('', ., ..), invalid base URL, or a payload the HTTP client rejects (e.g. NAN or malformed UTF-8 in JSON) |
RateLimitedException extends TransportException. Redirects are never followed.
use Gupalo\BeeperbzClient\Exception\BeeperbzException; use Gupalo\BeeperbzClient\Exception\RateLimitedException; try { $client->send($token, 'hello'); } catch (RateLimitedException) { // slow down } catch (BeeperbzException $e) { // $e->getMessage() never contains the token }
Automatic retries
HttpTransport accepts any HttpClientInterface, so wrap it in RetryableHttpClient to retry
transient failures:
use Symfony\Component\HttpClient\HttpClient; use Symfony\Component\HttpClient\RetryableHttpClient; // The default strategy retries POST on 423, 425, 429, 502 and 503 only. $http = new RetryableHttpClient(HttpClient::create(['timeout' => 15]), maxRetries: 3); $transport = new HttpTransport($http, 'https://beeperbz.example.com');
With the default strategy a POST is retried only on 423, 425, 429, 502 and 503. Status 500, 504, 507 and 510 and transport errors (network failures, timeouts) are retried by default for idempotent methods only, so they are not retried for POST.
POST is not idempotent: a retry after 502/503 may deliver the message twice, because the server may have accepted it before the gateway failed. The same applies if you pass a custom strategy that retries POST on 500/504 or on transport errors.
Timeouts
An unknown token answers ok only after a random 3-5 s delay (anti-guessing). Do not set a timeout
below about 10 s.
Logging
Pass any PSR-3 logger as the third HttpTransport argument.
debug: redacted URL, request options (including the message body) and response statuswarning: redacted URL plus status or error message, when a request fails
Failures are logged at warning, not error, because every failure also throws: report it once,
where you catch the exception. Error-tracking handlers (e.g. Sentry's Monolog handler, which
captures error and above by default) then record one event per failure instead of two.
HttpTransport never writes the token: it is replaced with *** (raw and URL-encoded) in every
record it logs and in every exception message. Message bodies appear only at debug, so do not
enable it in production if messages are sensitive.
This covers only records written by HttpTransport. The token is part of the request URL
(/bz/{token}), and Symfony's own HTTP clients log it when they have a logger: CurlHttpClient and
NativeHttpClient write Request: "POST https://.../bz/<token>" at info, and
RetryableHttpClient writes Try #n ... records. In Symfony applications the autowired client has
a logger and logs to the http_client channel. To keep the token out of logs:
- pass a client without a logger (
HttpClient::create()), or - exclude the
http_clientchannel from your Monolog handlers, and - do not give
RetryableHttpClienta logger.
Caveats
- "Accepted" is not "delivered". Delivery is asynchronous on the server; the client only learns that the request was accepted.
- An unknown or revoked token still returns
ok, so the client cannot detect a bad token. - Content limits (block counts, text and label lengths, Telegram message size) are clamped by the
server, not by the client. See the beeperbz server's
doc/rich-messages.mdfor the details.
Development
composer install composer test composer phpstan composer coverage-check # CI gate: line coverage >= 50%
Smoke test: copy .env.local.example to .env.local, fill it in and run php examples/send.php.
License
MIT