Conversations

Initiate Telegram

Initiates conversation with the telegram integration

post
/v1/integration/telegram/{telegramIntegrationId}/initiate

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Request Body * Required

Request Body Schema: application/json

chatIdunknown

The Telegram chat ID, user ID, group chat ID, or channel username to send to

textstring

The text instruction to use to initiate the conversation

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

secret: process.env.CHATBOTKIT_API_KEY!

})

const response = await cbk.integration.telegram.initiate(

telegramIntegrationId,
{
"chatId":"",
"text":"string"
}
)
{
"id":"string"
}
The telegram integration was successfully initiated