Download the PHP package symfony/telegram-notifier without Composer
On this page you can find all versions of the php package symfony/telegram-notifier. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symfony/telegram-notifier
More information about symfony/telegram-notifier
Files in symfony/telegram-notifier
Package telegram-notifier
Short Description Symfony Telegram Notifier Bridge
License MIT
Homepage https://symfony.com
Informations about the package telegram-notifier
Telegram Notifier
Provides Telegram integration for Symfony Notifier.
DSN example
where:
TOKENis your Telegram tokenCHAT_IDis your Telegram chat idSSLMODEhttps is used by default. It can be changed by setting value todisable, http will be used
Interacting with local API server instead of official Telegram API
If such a case is needed, you can replace the default keyword in the DSN
with the desired domain/IP address of your local API server. You may also want to
disable the bridge's default behavior of using https protocol as local API servers
can only accept http traffic.
Example:
Caution: Disabling the use of the https protocol can pose a security risk.
You should only do this if your local API server is hosted somehow internally
and the traffic will remain within a secure environment.
Otherwise, you may want to implement a TLS-termination proxy in front of
your server for handling the encryption and decryption of the traffic,
So you can continue using it normally over https protocol.
Adding Interactions to a Message
With a Telegram message, you can use the TelegramOptions class to add
message options.
Adding files to a Message
With a Telegram message, you can use the TelegramOptions class to add
message options.
:warning: WARNING In one message you can send only one file
Telegram supports 3 ways for passing files:
-
You can send files by passing public http url to option:
-
Photo
-
Video
-
Animation
-
Audio
-
Document
- Sticker
-
-
You can send files by passing local path to option, in this case file will be sent via multipart/form-data:
-
Photo
-
Video
-
Animation
-
Audio
-
Document
- Sticker
-
-
You can send files by passing file_id to option:
-
Photo
-
Video
-
Animation
-
Audio
-
Document
- Sticker - Can't be sent using file_id
-
Full example:
Adding Location to a Message
With a Telegram message, you can use the TelegramOptions class to add
message options.
Adding Venue to a Message
With a Telegram message, you can use the TelegramOptions class to add
message options.
Adding Contact to a Message
With a Telegram message, you can use the TelegramOptions class to add
message options.
Updating Messages
The TelegramOptions::edit() method was introduced in Symfony 6.2.
When working with interactive callback buttons, you can use the TelegramOptions
to reference a previous message to edit.
Answering Callback Queries
The TelegramOptions::answerCallbackQuery() method was introduced in Symfony 6.3.
When sending message with inline keyboard buttons with callback data, you can use
TelegramOptions to answer callback queries.
Sponsor
This package is looking for a backer.
Help Symfony by sponsoring its development!
Resources
All versions of telegram-notifier with dependencies
symfony/http-client Version ^7.4|^8.0
symfony/mime Version ^7.4|^8.0
symfony/notifier Version ^7.4|^8.0