FoPost LogoFoPost Docs
Platforms

Telegram

Publishing to Telegram channels and groups.

Telegram

Telegram is one of the most feature-rich platforms in OwlStack, supporting text, media, media groups, inline keyboards, locations, contacts, and venues.

Connect

Connect Telegram in the OwlStack dashboard:

  1. Go to Project Settings > Platforms > Telegram
  2. Enter your Bot API token (from @BotFather)
  3. Select the target channel or group
  4. Click Connect

Getting a Bot Token

  1. Open Telegram and search for @BotFather
  2. Send /newbot and follow the prompts
  3. Copy the API token
  4. Add your bot as an admin to your channel/group

Publishing

use OwlStack\Enums\Platform;

$result = $client->publish($post, [Platform::Telegram]);

Options

OptionTypeDescription
chat_idstringOverride target chat/channel
parse_modestringHTML or Markdown
disable_notificationboolSend silently
inline_keyboardarrayInline keyboard buttons
$result = $client->publish($post, [Platform::Telegram], [
    'chat_id' => '@specific-channel',
    'parse_mode' => 'HTML',
    'disable_notification' => true,
    'inline_keyboard' => [
        [['text' => 'Visit Site', 'url' => 'https://example.com']],
    ],
]);

Constraints

ConstraintValue
Max text length4,096 characters
Max media per group10
Supported media typesJPEG, PNG, GIF, MP4, OGG
Formatter markupHTML

On this page