
Telegram Bot API client atop Ktor HttpClient, offering sendMessage utilities, AutoCloseable lifecycle management, and option to wrap an existing HTTP client for seamless integration.
Kotlin Multiplatform Telegram Bot API client on top of the
Ktor HttpClient. Published to Maven
Central as pw.binom.telegram:telegramClient.
dependencies {
implementation("pw.binom.telegram:telegramClient:0.1.0")
implementation("io.ktor:ktor-client-cio:3.2.0")
}val tg = TelegramClient.open(CIO, token = "<bot-token>")
tg.use {
it.sendMessage(TextMessage(chatId = "1", text = "Hello, world!"))
}TelegramClient is AutoCloseable. If you already maintain your own
HttpClient, hand it to TelegramClient.wrap(http, token = "…") instead.
JVM, iOS (arm64 + simulator), macOS (arm64), Linux (x64 + arm64), Windows (mingw x64).
Kotlin Multiplatform Telegram Bot API client on top of the
Ktor HttpClient. Published to Maven
Central as pw.binom.telegram:telegramClient.
dependencies {
implementation("pw.binom.telegram:telegramClient:0.1.0")
implementation("io.ktor:ktor-client-cio:3.2.0")
}val tg = TelegramClient.open(CIO, token = "<bot-token>")
tg.use {
it.sendMessage(TextMessage(chatId = "1", text = "Hello, world!"))
}TelegramClient is AutoCloseable. If you already maintain your own
HttpClient, hand it to TelegramClient.wrap(http, token = "…") instead.
JVM, iOS (arm64 + simulator), macOS (arm64), Linux (x64 + arm64), Windows (mingw x64).