gateways/ - Telegram

Long-poll push-style gateway - getUpdates on a scheduled task.

Telegram

Part of the push-style gateways/ family - see there for the shared "secrets stay external" rule, GatewaySession, and the scheduler these gateways run under. This page covers Telegram's own config shape and (where BxAgents does anything platform-specific) how it talks to Telegram.

// gateways/telegramChannel.bx
class {
	function configure() {
		return {
			type          : "telegram",
			botTokenEnvVar: "TELEGRAM_BOT_TOKEN"
		};
	}
}

Validation: type: "telegram" requires botTokenEnvVar. Checked the same way a channel-adapter http entry's secretEnvVar is.

Generated registration statement:

aiGatewayRegistry().register( aiGateway( "bxModules.bxagents.models.gateways.TelegramGateway", { "botToken" : getSystemSetting( "TELEGRAM_BOT_TOKEN", "" ) } ) )
Edit this page Download Markdown Last updated Sep 17, 2026, 5:15:06 PM