OSS-first docs
These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.
Telegram messaging integration for inbound webhook updates, threaded topic messages, and outbound bot replies.
Source Definition
export const messagingTelegramIntegrationSpec = defineIntegration({
meta: {
key: 'messaging.telegram',
version: '1.0.0',
category: 'messaging',
title: 'Telegram Bot API',
description:
'Telegram messaging integration for inbound webhook updates, threaded topic messages, and outbound bot replies.',
domain: 'communications',
owners: ['platform.messaging'],
tags: ['messaging', 'telegram'],
stability: StabilityEnum.Beta,
},
supportedModes: ['managed', 'byok'],
transports: [
{ type: 'rest', baseUrl: 'https://api.telegram.org' },
{
type: 'webhook',
inbound: {
signatureHeader: 'x-telegram-bot-api-secret-token',
signingAlgorithm: 'hmac-sha256',
},
},
],
preferredTransport: 'rest',
capabilities: {
provides: [
{ key: 'messaging.inbound', version: '1.0.0' },
{ key: 'messaging.outbound', version: '1.0.0' },
],
},
configSchema: {
schema: {
type: 'object',
properties: {
defaultChatId: {
type: 'string',
description:
'Optional default Telegram chat ID used for outbound sends when no chat target is provided.',
},
apiBaseUrl: {
type: 'string',
description:
'Optional Telegram Bot API base URL override for proxies or self-hosted gateways.',
},
},
},
example: {
defaultChatId: '-1001234567890',
apiBaseUrl: 'https://api.telegram.org',
},
},
secretSchema: {
schema: {
type: 'object',
required: ['botToken', 'secretToken'],
properties: {
botToken: {
type: 'string',
description:
'Telegram bot token used for sendMessage and webhook registration.',
},
secretToken: {
type: 'string',
description:
'Webhook secret token expected in the X-Telegram-Bot-Api-Secret-Token header.',
},
},
},
example: {
botToken: '123456789:AA***',
secretToken: 'contractspec-telegram-webhook',
},
},
healthCheck: {
method: 'custom',
timeoutMs: 4000,
},
docsUrl: 'https://core.telegram.org/bots/api',
constraints: {
rateLimit: {
rpm: 180,
},
},
byokSetup: {
setupInstructions:
'Create a Telegram bot with BotFather, set a webhook with a secret token, then provide the bot token and secret token.',
keyRotationSupported: true,
quotaTrackingSupported: false,
},
});