sgcSocial: WhatsApp & Telegram Components for Delphi & C++ Builder
Standalone product WhatsApp Business & Telegram

sgcSocial: WhatsApp & Telegram Components for Delphi & C++ Builder

Two client components put your applications on the two messaging networks your users already have open. TsgcWhatsApp_Client speaks the WhatsApp Business Cloud API over plain HTTPS, sending and receiving through Meta's Graph API. TsgcTDLib_Telegram is a full Telegram client built on the official TDLib engine, user accounts and bots alike, not just the Bot API. sgcSocial is standalone, it bundles the sgcWebSockets Core runtime both clients are built on.

Full source code
Delphi 7 to 13 & C++ Builder
Bundled runtime sgcWebSockets Core The HTTP, TLS and JSON runtime under both clients
Telegram TsgcTDLib_Telegram
WhatsApp TsgcWhatsApp_Client
2 Client components One page on the component palette
2 Messaging networks WhatsApp Business Platform and Telegram
5 Telegram platforms TDLib builds for Windows, macOS, Linux 64-bit, Android and iOS
100% Source code included Both clients and the bundled Core runtime
12 Months of updates Every release published while your license is active

Two Things Worth Knowing First

What sgcSocial needs from you, and whether you already own these components. Both answers are short.

sgcSocial is self-contained

Standalone, the sgcWebSockets Core runtime is included: the HTTP/TLS client stack the WhatsApp client calls the Graph API with, the HTTP server that hosts its webhook endpoint, and the JSON machinery both clients parse their traffic with. One SKU, one installer.

Full source code ships with every license, so both clients and the runtime under them step through in your own debugger rather than disappearing into a binary.

Edition overlap

Already in your sgcWebSockets edition?

The Telegram client ships inside sgcWebSockets from the Standard edition up, and the WhatsApp client from Professional up, so if you own one of those editions you already have the matching component. All-Access includes everything.

sgcSocial exists for the opposite case: you want WhatsApp and Telegram in Delphi or C++ Builder without licensing a full sgcWebSockets edition. Check what your edition already covers before you buy.

Two Clients, Two Messaging Networks

Each one is a non-visual component you drop on a form or create in code, declared in the sgcLibs unit and registered on the SGC Social palette page. Set the account credentials, wire the events, then call the typed send methods.

Telegram1 component

A full Telegram client, user accounts and bots

TsgcTDLib_Telegram is built on TDLib, the official Telegram Database Library that powers Telegram's own applications, so it signs in as a real user account or as a bot, not just through the Bot API. The phone-number authentication flow is surfaced as events, OnAuthenticationCode, OnAuthenticationPassword for 2FA and OnRegisterUser, and traffic arrives typed: OnMessageText, OnMessagePhoto, OnMessageVideo, OnMessageDocument, OnNewChat and OnNewCallbackQuery, with a raw OnEvent underneath. Send text, rich text, documents, photos, videos, albums and invoices, edit, delete, forward and pin messages, create and search chats, groups, supergroups and secret chats, and attach inline or reply keyboards, including request-location and request-phone-number buttons. Anything TDLib knows that is not wrapped yet goes through SendCustomRequest, and HTTP, SOCKS5 and MTProto proxies are one call each.

TsgcTDLib_Telegram Official TDLib engine
WhatsApp1 component

The Business Cloud API, outbound and inbound

TsgcWhatsApp_Client talks to the WhatsApp Business Cloud API through Meta's Graph API over plain HTTPS. Configure WhatsAppOptions.PhoneNumberId and Token and send: text, reactions, locations, contacts, interactive lists and buttons, and template messages with a template name, language code and per-message parameters, the format business-initiated conversations require. Media goes out two ways, SendMessageImage and its siblings reference a public link while SendFileImage and its siblings upload a local file first, and UploadMedia, DownloadMedia and DeleteMedia manage the stored copies. Inbound is covered by the built-in webhook endpoint: StartServer hosts it with ServerOptions and TLSOptions, OnBeforeSubscribe answers Meta's verification handshake, and OnMessageReceived hands you each message with a var aMarkAsRead flag that sends the read receipt for you.

TsgcWhatsApp_Client Meta Graph API · Pure HTTPS

Conversational Messaging from Delphi Code

Both components are ordinary non-visual components, so they slot into whatever your application already is: a VCL desktop app, a Windows service, a Linux daemon. These are the patterns customers build, each mapped to the call that implements it.

Order and delivery updates SendMessageTemplate

WhatsApp template messages open a business-initiated conversation: approved once, then sent from your code with per-order parameters.

Login and one-time codes SendTextMessage

Deliver codes over Telegram the moment your backend generates them, on a channel users actually watch.

Alerts and monitoring SendRichTextMessage

A service that posts exceptions, thresholds and daily summaries to the ops group your team already has open.

Customer support inbox OnMessageReceived

Inbound WhatsApp messages land on your own webhook endpoint as events, with a var flag that marks them read.

Chatbots with buttons AnswerCallbackQuery

Inline keyboards on Telegram and interactive lists and buttons on WhatsApp turn a conversation into a menu your code drives.

Payments and invoices SendInvoiceMessage

Send Telegram invoice messages, answer the pre-checkout query and submit the payment form, all from the component.

Two Clients, One Bundled Runtime

The two components could hardly be more different on the wire. One is a REST-style HTTPS API, the other a native database library, and that is the point of packaging them together: sgcSocial hides the difference behind the same component conventions, with the bundled sgcWebSockets Core runtime doing the plumbing underneath.

WhatsApp is HTTPS plus a webhook

Outbound calls are Graph API requests over TLS, issued through the Core runtime's HTTP client stack, so the component runs on every platform Delphi compiles for. Inbound messages are pushed by Meta to the webhook endpoint the component hosts itself: StartServer, ServerOptions and OnBeforeSubscribe for the verification handshake.

Telegram is the native TDLib engine

TsgcTDLib_Telegram drives the official TDLib library through its JSON interface: the component loads the native library, walks the authentication state machine for you and turns the update stream into typed Delphi events. TDLib ships for Windows, macOS, Linux 64-bit, Android and iOS.

The Core runtime is in the box

Standalone, the sgcWebSockets Core runtime is included. It contributes the HTTP/TLS client stack, the HTTP server under the webhook endpoint and the JSON parser both clients depend on, and its full source is part of the package like everything else.

Proxies, TLS and logging

The Telegram client reaches restrictive networks through HTTP, SOCKS5 or MTProto proxies with AddProxyHTTP, AddProxySocks5 and AddProxyMTProto. The WhatsApp client exposes TLSOptions for its endpoints and can write its traffic to a log file while you integrate.

Send on WhatsApp, Echo on Telegram

Both components follow the same shape: set the account credentials, assign the event handlers, activate. They are declared in the sgcLibs unit, and the same code compiles in Delphi 7 to 13 and C++ Builder.

uses
  sgcLibs;

var
  WhatsApp: TsgcWhatsApp_Client;
  Telegram: TsgcTDLib_Telegram;
begin
  // WhatsApp: Business Cloud API over HTTPS
  WhatsApp := TsgcWhatsApp_Client.Create(nil);
  WhatsApp.WhatsAppOptions.PhoneNumberId := '123456789012345';
  WhatsApp.WhatsAppOptions.Token := 'EAAG...';

  WhatsApp.OnMessageReceived := WhatsAppMessageReceived;
  WhatsApp.StartServer;   // webhook endpoint for inbound messages

  WhatsApp.SendMessageText('+34600111222', 'Your order is on its way.');

  // Telegram: the official TDLib engine
  Telegram := TsgcTDLib_Telegram.Create(nil);
  Telegram.Telegram.API.ApiId := '123456';
  Telegram.Telegram.API.ApiHash := 'your-api-hash';
  Telegram.Telegram.PhoneNumber := '+34600111222';

  Telegram.OnAuthenticationCode := TelegramAuthenticationCode;
  Telegram.OnMessageText := TelegramMessageText;

  Telegram.Active := True;
end;

procedure TForm1.WhatsAppMessageReceived(Sender: TObject;
  const aMessage: TsgcWhatsApp_Receive_Message;
  var aMarkAsRead: Boolean);
begin
  Memo1.Lines.Add(aMessage.RawMessage);
  aMarkAsRead := True;   // sends the read receipt
end;

procedure TForm1.TelegramAuthenticationCode(Sender: TObject;
  var Code: String);
begin
  Code := InputBox('Telegram', 'Login code', '');
end;

procedure TForm1.TelegramMessageText(Sender: TObject;
  MessageText: TsgcTelegramMessageText);
begin
  Memo1.Lines.Add(MessageText.ChatId + ': ' + MessageText.Text);
  Telegram.SendTextMessage(MessageText.ChatId, 'Got it, thanks!');
end;
// include: sgcLibs.hpp

// WhatsApp: Business Cloud API over HTTPS
TsgcWhatsApp_Client *WhatsApp = new TsgcWhatsApp_Client(this);
WhatsApp->WhatsAppOptions->PhoneNumberId = "123456789012345";
WhatsApp->WhatsAppOptions->Token = "EAAG...";

WhatsApp->OnMessageReceived = WhatsAppMessageReceived;
WhatsApp->StartServer();   // webhook endpoint for inbound messages

WhatsApp->SendMessageText("+34600111222", "Your order is on its way.");

// Telegram: the official TDLib engine
TsgcTDLib_Telegram *Telegram = new TsgcTDLib_Telegram(this);
Telegram->Telegram->API->ApiId = "123456";
Telegram->Telegram->API->ApiHash = "your-api-hash";
Telegram->Telegram->PhoneNumber = "+34600111222";

Telegram->OnMessageText = TelegramMessageText;

Telegram->Active = true;

void __fastcall TForm1::WhatsAppMessageReceived(TObject *Sender,
    TsgcWhatsApp_Receive_Message* const aMessage, bool &aMarkAsRead)
{
  Memo1->Lines->Add(aMessage->RawMessage);
  aMarkAsRead = true;   // sends the read receipt
}

void __fastcall TForm1::TelegramMessageText(TObject *Sender,
    TsgcTelegramMessageText *MessageText)
{
  Memo1->Lines->Add(MessageText->ChatId + ": " + MessageText->Text);
  Telegram->SendTextMessage(MessageText->ChatId, "Got it, thanks!");
}

Pure HTTPS on One Side, Native TDLib on the Other

The WhatsApp client is plain HTTPS, so it compiles and runs wherever Delphi does. The Telegram client drives the native TDLib library, which Telegram publishes for five platforms.

TsgcWhatsApp_Client Business Cloud API over HTTPS, webhook server included
Windows Win32 Windows Win64 Linux64 macOS iOS Android
TsgcTDLib_Telegram Runs wherever the native TDLib library does
Windows macOS Linux 64-bit Android iOS
IDE support One source tree, design-time packages per version
Delphi 7 to 13 C++ Builder
Trial installer The sgcWebSockets All-Access trial includes the Social components
One download, both components

Download the trial installer →

A Standalone Package

sgcSocial is licensed on its own, starting at €249 for a single developer. All licenses include full source code, 1 year of updates and a 50% to 70% renewal discount: 50% when you renew one pack, 60% for two, 70% for three or more. sgcAI, sgcMQ and sgcSocial each count as a pack.

sgcSocial

€249

Single, Team and Site licenses available.

  • Telegram client on the official TDLib, user accounts & bots
  • WhatsApp Business Cloud API client
  • Built-in WhatsApp webhook endpoint
  • Templates, media, inline & reply keyboards
  • sgcWebSockets Core runtime included
  • Delphi 7 to 13 & C++ Builder
  • Full source code
  • 1 year of updates

sgcSocial includes the sgcWebSockets Core runtime, so there is nothing else to buy.

Checkout lists two items: the sgcWebSockets Core runtime entitlement, which is charged at zero, and the sgcSocial pack itself. Full pricing details.

3,000+Developers
20+Years
761+Components
30+API Integrations
5Platforms
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy

Reach Your Users Where They Already Chat

WhatsApp and Telegram from native Delphi and C++ Builder code, with the runtime bundled in and full source code in the box. Download the All-Access trial installer and drop both components on a form today.

Other Products by eSeGeCe

Pair sgcSocial with our other Delphi, C++ Builder and .NET component libraries.

sgcWebSockets

The full library: WebSocket clients and servers, HTTP/2, IoT, P2P and AI components. Its editions include Telegram and WhatsApp too.

Learn more →

sgcAI

AI, LLM and MCP components. One chat component reaches OpenAI, Anthropic, Gemini, DeepSeek, Ollama, Grok and Mistral.

Learn more →

sgcMQ

Native MQTT 3.1.1/5.0, AMQP 0.9.1, AMQP 1.0, Apache Kafka and STOMP client components, with the Core runtime bundled.

Learn more →

sgcQUIC

QUIC (RFC 9000) and HTTP/3 (RFC 9114) client and server components built on the native OpenSSL 3.5 QUIC engine.

Learn more →

sgcHTML

Data-aware server-side HTML/UI components for Delphi, C++ Builder and .NET, with Bootstrap 5 and htmx.

Learn more →

sgcSign

Enterprise digital signatures. XAdES, PAdES, CAdES and ASiC with 10 key providers and 21 EU country profiles.

Learn more →