Unicorb.Telegram.Configuration
0.9.17-alpha
dotnet add package Unicorb.Telegram.Configuration --version 0.9.17-alpha
NuGet\Install-Package Unicorb.Telegram.Configuration -Version 0.9.17-alpha
<PackageReference Include="Unicorb.Telegram.Configuration" Version="0.9.17-alpha" />
<PackageVersion Include="Unicorb.Telegram.Configuration" Version="0.9.17-alpha" />
<PackageReference Include="Unicorb.Telegram.Configuration" />
paket add Unicorb.Telegram.Configuration --version 0.9.17-alpha
#r "nuget: Unicorb.Telegram.Configuration, 0.9.17-alpha"
#:package Unicorb.Telegram.Configuration@0.9.17-alpha
#addin nuget:?package=Unicorb.Telegram.Configuration&version=0.9.17-alpha&prerelease
#tool nuget:?package=Unicorb.Telegram.Configuration&version=0.9.17-alpha&prerelease
Unicorb.Telegram.Configuration
Telegram Bot API infrastructure for .NET apps: ITelegramBotClient, webhook, polling and SOCKS5 proxy.
The package does not depend on Unicorb. It only configures Telegram services.
TFM: net9.0, net10.0
The API may change before version 1.0.0.
Install
dotnet add package Unicorb.Telegram.Configuration
Quick Start
using Telegram.Bot.Types.Enums;
using Unicorb.Telegram.Configuration.Enums;
using Unicorb.Telegram.Configuration.Models;
var telegramOptions = new TelegramBotConfig
{
Token = builder.Configuration["Telegram:Token"]!,
UpdateMode = TelegramUpdateMode.Webhook,
WebhookBaseUrl = "https://example.com",
WebhookRoute = "telegram/webhook",
AllowedUpdates = [UpdateType.Message, UpdateType.CallbackQuery],
};
builder.Services.AddTelegramConfiguration(telegramOptions);
Update Modes
Webhook: callsSetWebhookon startup; Telegram sends POST requests to{WebhookBaseUrl}/{WebhookRoute}.Polling: reads updates with long polling and forwards them by POST to{LocalBaseUrl}/{WebhookRoute}.
For polling, set LocalBaseUrl, for example http://localhost:5000.
API request logging
Bot API calls are logged at Debug under category Telegram.Bot.Networking (method and API method name only, no token or body):
"Logging": {
"LogLevel": {
"Telegram.Bot.Networking": "Debug"
}
}
SOCKS5 Proxy
telegramOptions.Proxy = new TelegramProxyOptions
{
Enabled = true,
Host = "127.0.0.1",
Port = 1080,
Username = "",
Password = "",
};
Next Steps
Unicorb.Telegram.Bridgeconnects Telegram to the Unicorb pipeline.Unicorb.Telegram.Configuration.AspNetCoreaddsapp.UseTelegramWebhook().ITelegramBotUserServicestores theGetMeresult.TelegramBotExtensionsprovides helpers forUpdateandMessage.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- HttpToSocks5Proxy (>= 1.4.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Http (>= 9.0.10)
- Microsoft.Extensions.Options (>= 9.0.10)
- Telegram.Bot (>= 22.3.0)
-
net9.0
- HttpToSocks5Proxy (>= 1.4.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.10)
- Microsoft.Extensions.Http (>= 9.0.10)
- Microsoft.Extensions.Options (>= 9.0.10)
- Telegram.Bot (>= 22.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Unicorb.Telegram.Configuration:
| Package | Downloads |
|---|---|
|
Unicorb.Telegram.Bridge
Telegram transport bridge for Unicorb: update pipeline, state machine, extractors, and Bot API adapter |
|
|
Unicorb.Telegram.Configuration.AspNetCore
ASP.NET Core webhook endpoint for Unicorb Telegram bots: default POST route to IUpdateService |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.17-alpha | 31 | 7/30/2026 |
| 0.9.16-alpha | 32 | 7/30/2026 |
| 0.9.15-alpha | 33 | 7/30/2026 |
| 0.9.14-alpha | 38 | 7/29/2026 |
| 0.9.13-alpha | 58 | 7/21/2026 |
| 0.9.12-alpha | 56 | 7/20/2026 |
| 0.9.11-alpha | 61 | 7/15/2026 |
| 0.9.10-alpha | 64 | 7/13/2026 |
| 0.9.9-alpha | 60 | 7/13/2026 |
| 0.9.8-alpha | 61 | 7/12/2026 |
| 0.9.7-alpha | 65 | 7/10/2026 |
| 0.9.6-alpha | 72 | 7/10/2026 |
| 0.9.5-alpha | 63 | 7/9/2026 |
| 0.9.4-alpha | 64 | 7/9/2026 |
| 0.9.3-alpha | 71 | 6/24/2026 |
| 0.9.2-alpha | 82 | 6/23/2026 |
| 0.9.1-alpha | 69 | 6/14/2026 |
| 0.9.0-alpha | 70 | 6/14/2026 |