sgcSocial Telegram. WhatsApp. Native in Delphi.

Two components put the two biggest messaging networks inside your Delphi and C++ Builder applications. TsgcTDLib_Telegram drives the official TDLib engine, the same core the Telegram apps are built on, for full user-account and bot clients: phone sign-in with 2FA, chats, media, keyboards and payments. TsgcWhatsApp_Client speaks the WhatsApp Business Cloud API over plain HTTPS, templates and webhook included.

Send your first WhatsApp message in a few lines →
  • Delphi 7 to 13
  • C++ Builder
  • Telegram TDLib
  • WhatsApp Business
  • Built-in webhook
  • Full source code
  • 2Client components on one palette page
  • 2Messaging networks: Telegram and WhatsApp
  • 5Telegram platforms through native TDLib builds
  • 1Installer, the sgcWebSockets Core runtime included
  • 100%Source code included with every license
Watch it work

See sgcSocial in two minutes.

A narrated and captioned walkthrough of both components: a WhatsApp message in one call, a Telegram client signing in, and the events that bring incoming traffic back. Nothing downloads until you press play.

sgcSocial quickstart

A business messaging channel and a full Telegram client, both as ordinary Delphi components.

  1. Two components, two modelsWhatsApp is the Business Cloud API over HTTP. Telegram is TDLib, a real client rather than a bot.
  2. Send a WhatsApp messageSet PhoneNumberId and Token, call SendMessageText. Matching calls cover images, documents, audio, video, stickers and reactions.
  3. Media, two waysPass a public link, or let the SendFile calls upload the file from disk first.
  4. Telegram keeps stateAPI id and hash, a database directory and an encryption key, then the phone, the code and the 2FA password.
  5. Messages and eventsText, rich text, albums, invoices and inline keyboards out, one event per content type in.
  6. One deployment notetdjson ships beside your application. WhatsApp needs nothing, because it is only HTTP.
What is in the box

One component per network, one API style.

Drop a component on a form, set the credentials, wire the events, then call the send methods. The naming is consistent across both, so a support inbox, a notification pipeline or a chatbot reads the same whichever network it targets.

Telegram · TDLib

View →
  • TsgcTDLib_Telegram
  • SendTextMessage
  • SendPhotoMessage
  • SendDocumentMessage
  • SendMessageAlbum
  • SendInvoiceMessage
  • EditTextMessage
  • ForwardMessages

A full Telegram client, users and bots alike. It drives the official TDLib engine, so it signs in as a real user account with phone authentication and the 2FA password step (OnAuthenticationCode, OnAuthenticationPassword), or as a bot with a token. Group, supergroup and secret chats, searches, inline and reply keyboards and payments are typed methods and events, and incoming traffic arrives as OnMessageText, OnMessageDocument, OnMessagePhoto, OnMessageVideo, OnNewChat and OnNewCallbackQuery.

WhatsApp Business

View →
  • TsgcWhatsApp_Client
  • SendMessageText
  • SendFile*
  • UploadMedia
  • DownloadMedia
  • DeleteMedia
  • MarkMessageRead
  • StartServer

The Cloud API, webhook included. It talks to the WhatsApp Business Cloud API (the Meta Graph API) with a PhoneNumberId and a Token. Text, image, document, audio, video and sticker messages, reactions, location and contact cards, interactive lists and buttons, and message templates with a language code. The built-in webhook endpoint (OnBeforeSubscribe verification, OnMessageReceived, OnMessageSent) receives inbound traffic without an extra server.

See every component and property

Built for the inbox

Support, alerts and chatbots, from Pascal.

Both components run happily inside a VCL or FMX application, a service or a console process, and both read the same in Object Pascal and in C++ Builder.

Use cases

Customer support inboxes, order and delivery notifications, 2FA and alert delivery, chatbots, marketing templates and desktop agent tools.

Proxies and raw JSON

The Telegram component connects through HTTP, SOCKS5 and MTProto proxies, and when Telegram grows a call before the typed wrapper does, SendCustomRequest posts the raw TDLib JSON directly, so you are never waiting on a component update.

Cross-platform

TDLib ships native builds for Windows, macOS, Linux 64-bit, Android and iOS. The WhatsApp client is pure HTTPS, so it compiles wherever Delphi does. From Delphi 7 through RAD Studio 13 and on C++ Builder.

Quick start

Two networks, the same shape.

Create the component, set the credentials, hook the events, call the send methods. Both components live in the sgcLibs unit, and both read the same in Object Pascal and in C++ Builder.

uses
  sgcLibs;
var
  Telegram: TsgcTDLib_Telegram;
begin
  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.TelegramAuthenticationCode(Sender: TObject;
  var Code: string);
begin
  Code := InputBox('Telegram', 'Enter the code you received', '');
end;

procedure TForm1.TelegramMessageText(Sender: TObject;
  MessageText: TsgcTelegramMessageText);
begin
  Memo1.Lines.Add(MessageText.ChatId + ': ' + MessageText.Text);
  Telegram.SendTextMessage(MessageText.ChatId, 'received!');
end;
uses
  sgcLibs;
var
  WhatsApp: TsgcWhatsApp_Client;
begin
  WhatsApp := TsgcWhatsApp_Client.Create(nil);
  WhatsApp.WhatsAppOptions.PhoneNumberId := '123456789012345';
  WhatsApp.WhatsAppOptions.Token := 'EAAG...';

  WhatsApp.SendMessageText('+34666555444', 'hello from Delphi');

  WhatsApp.OnMessageReceived := WhatsAppMessageReceived;
  WhatsApp.StartServer;
end;

procedure TForm1.WhatsAppMessageReceived(Sender: TObject;
  const aMessage: TsgcWhatsApp_Receive_Message;
  var aMarkAsRead: Boolean);
begin
  Memo1.Lines.Add(aMessage.RawMessage);
  aMarkAsRead := True;
end;
  1. Credentials in, events wiredAn api_id and api_hash or a bot token for Telegram, a PhoneNumberId and a Token for WhatsApp. Assign the handlers, then activate.
  2. Telegram walks you through sign-inOnAuthenticationCode asks for the code, OnAuthenticationPassword for the 2FA password when the account has one.
  3. Media without hosting itPass a public link and Meta fetches it, or let the SendFile calls upload the file from disk first.
  4. A webhook without an extra serverStartServer hosts the endpoint Meta pushes to, with OnBeforeSubscribe verification and OnMessageReceived for inbound traffic.
sgcSocial quickstart: TsgcTDLib_Telegram is configured in Delphi and the authorization flow moves from the phone number to the code and the 2FA password.
TDLib keeps state: the component walks you through authorization, then stays signed in.

Read the Quick Start guide

Before you buy

Two things worth knowing first.

What each component needs from you, and how the messages reach each network. Both answers are short, and both are on this page rather than in the small print.

network      component             engine
Telegram     TsgcTDLib_Telegram    official TDLib (tdjson)
WhatsApp     TsgcWhatsApp_Client   HTTPS, Meta Graph API

credentials you bring
Telegram     api_id + api_hash (user), or a bot token
WhatsApp     PhoneNumberId + Token (Meta business account)

TDLib native builds: Windows, macOS, Linux 64-bit,
  Android and iOS. Point LibraryPath at the build
  for your platform.
The WhatsApp client is pure HTTPS: no native library,
  every platform Delphi targets.

Telegram ships with an engine

TsgcTDLib_Telegram loads the official TDLib library at runtime (tdjson.dll, libtdjson.so, libtdjson.dylib), the same engine the Telegram clients are built on. That is what makes a full user-account client possible: phone number sign-in with the 2FA password step, secret chats and the complete update stream, next to plain bot tokens.

WhatsApp needs only HTTPS

The WhatsApp Business Cloud API is hosted by Meta, so TsgcWhatsApp_Client is a pure HTTPS client plus a built-in webhook endpoint for inbound messages. There is no native library at all. You bring a Meta business account, a PhoneNumberId and a Token.

Nothing in between is a black box

sgcSocial talks to the published surfaces of both networks: the TDLib JSON interface for Telegram and the Business Cloud API for WhatsApp. Messages, media, templates, keyboards, payments and webhooks are first-class methods and events, with full source code in the box.

Part of sgcWebSockets

One sgcWebSockets package, on its own.

sgcSocial packs the two messaging components of sgcWebSockets into a single package. Every license includes both components, the sgcWebSockets Core runtime (the HTTP and TLS layer, the JSON helpers and the webhook server), full source code, royalty-free redistribution and 1 year of updates.

Single

1 developer license. Use on one machine at a time.

€249

Team

2 developer licenses. Use on two machines at a time.

€399

Site

Unlimited developers. All company machines.

€649

Renewal is offered at a 50% to 70% discount. Already on sgcWebSockets? The Telegram client ships from the Standard edition up and the WhatsApp client from Professional up, so your edition may already cover you, and the All-Access bundle includes everything. The trial installer is the sgcWebSockets All-Access trial, so both components can be evaluated today.

View pricing and order
Testimonials

What Developers Say

Trusted by Delphi, C++ Builder, Lazarus and .NET developers around the world.

Your sgcWebSockets library is very useful and easy to setup. Keep up the good work!
Simone Moretti Delphi Developer
sgcWebSockets is amazing and your support is the best!
Christian Meyer Founder & CTO
Thanks so much for your help and support, I love your components.
Mark Steinfeld CTO

Message your users from Delphi.

Telegram and WhatsApp Business in one package, driven by the official TDLib engine and the Cloud API, with the sgcWebSockets Core runtime bundled in and full source code in the box.

More From eSeGeCe

Other Products by eSeGeCe

sgcSocial is one of the eSeGeCe component libraries for Delphi, C++ Builder and .NET. They share conventions, they ship with full source, and they deploy royalty-free.

sgcWebSockets

WebSocket, HTTP/2, MQTT, AMQP, WebRTC, AI and 30+ API integrations for Delphi, C++ Builder, Lazarus and .NET. This is where the Core runtime lives, and its editions include Telegram and WhatsApp too.

sgcHTML

Server-side HTML and UI components on Bootstrap 5 and htmx. Put a live dashboard in front of the conversations sgcSocial handles.

sgcAI

AI, LLM and MCP components for Delphi and C++ Builder. Seven LLM providers behind one component, plus MCP, embeddings and speech.

sgcMQ

MQTT, AMQP 0.9.1 and 1.0, Apache Kafka and STOMP client components for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcAuth

OAuth2 client, JWT client and WebAuthn support for Delphi and C++ Builder. Standalone, with the sgcWebSockets Core runtime bundled in.

sgcHTTP

HTTP server, HTTP/2 client, gRPC client and Google Cloud Pub/Sub, Calendar and FCM clients for Delphi and C++ Builder.

sgcREST

REST server, OpenAPI server and OpenAPI client components. Publish REST APIs from an OpenAPI 3.x contract, or consume any OpenAPI-described API.

sgcQUIC

Raw QUIC transport and an HTTP/3 client and server, with WebTransport. An add-on to sgcWebSockets Enterprise.

sgcOpenAPI

OpenAPI 3.x parser, native Pascal SDK generator, OpenAPI server component, and 1,195+ pre-built cloud SDKs.

sgcSign

XAdES, PAdES, CAdES and ASiC for documents, Authenticode, ClickOnce, NuGet and VSIX for code.

sgcPDF

Create, edit, view, sign, redact and validate PDF files in pure Object Pascal, with no DLL to deploy. Licensed on its own.

sgcBiometrics

Windows Hello, fingerprint sensors and the Windows Biometric Framework for Delphi and C++ Builder.

sgcCrypto

General-purpose cryptography library for Delphi and C++ Builder: symmetric and asymmetric ciphers, hashing and post-quantum algorithms. Ships free from sgcWebSockets Standard up.

sgcIndy

Updated Indy TCP/IP components with modern TLS, IPv6 and HTTP/2 for Delphi 7 through 13.

Latest from the blog

View all posts →

You are seeing the sgcSocial view of eSeGeCe.

Show me another angle →
30-Day Money-Back GuaranteeNot satisfied? Request a full refund within 30 days of purchase. See refund policy