sgcSocial Feature Matrix: WhatsApp & Telegram | eSeGeCe

sgcSocial Feature Matrix

Everything sgcSocial does, mapped across the two client components and the APIs they implement. Every capability works the same in Delphi and C++ Builder, and every license ships full source code. Click a component for its own page with usage and examples.

Telegram

Full client on the official TDLib

WhatsApp

Business Cloud API

Receiving Messages

Webhook server and real-time updates

Standards & Platforms

Delphi 7 to 13, C++ Builder

sgcSocial is self-contained. It ships with the sgcWebSockets Core runtime bundled in, so it is not an add-on.

Also inside sgcWebSockets. The Telegram client also ships inside sgcWebSockets editions from Standard up, and the WhatsApp client from Professional up. All-Access includes everything. sgcSocial is the standalone package for teams that only need the messaging clients.

Two Palette Components

Two messaging networks, registered on the SGC Social palette page.

ComponentClassNetworkDescription
Telegram ClientTsgcTDLib_TelegramTelegramFull Telegram client on the official TDLib: user accounts and bots, chats and groups, media, inline keyboards, payments and proxies.
WhatsApp ClientTsgcWhatsApp_ClientWhatsAppWhatsApp Business Cloud API client: text, media, templates and interactive messages, plus a built-in webhook server for inbound events.

A Full Telegram Client, Not Just the Bot API

TsgcTDLib_Telegram is built on the official TDLib (Telegram Database Library), so it signs in as a user account or as a bot and reaches the whole Telegram feature set.

CapabilityAPINotes
Sign in as a userTelegram.PhoneNumberPhone-number authentication: OnAuthenticationCode asks for the login code, OnAuthenticationPassword handles the 2FA password and OnRegisterUser covers new accounts.
Sign in as a botTelegram.BotTokenThe same component drives bot accounts through TDLib, with the full client surface rather than the Bot API subset.
API credentialsTelegram.API.ApiId, Telegram.API.ApiHashIssued for your application at my.telegram.org.
Connection stateOnConnectionStatus, OnAuthorizationStatusRaw TDLib state strings, such as authorizationStateReady.
Send textSendTextMessage, SendRichTextMessagePlain and rich text to any chat id.
Send mediaSendDocumentMessage, SendPhotoMessage, SendVideoMessageFiles, photos and videos, with SendMessageAlbum for grouped media.
PaymentsSendInvoiceMessage, AnswerPreCheckoutQuery, SendPaymentFormThe Telegram payments flow, end to end.
Edit and manageEditTextMessage, DeleteMessages, ForwardMessages, PinChatMessageThe message lifecycle after sending.
Chats and groupsCreatePrivateChat, CreateNewBasicGroupChat, CreateNewSupergroupChat, JoinChat, JoinChatByInviteLinkCreate and join conversations programmatically.
Secret chatsCreateNewSecretChatTDLib handles Telegram secret chats, the end-to-end encrypted kind.
SearchSearchChats, SearchMessages, SearchContacts, SearchPublicChatsAcross your chats, messages, contacts and public channels.
FilesDownloadFileDownloads any file TDLib references by id.
Inline keyboardsAnswerCallbackQuery, OnNewCallbackQueryCallback and URL buttons attached to messages you send.
Reply keyboardsKeyboard markup on the send methodsText buttons, request-location buttons and request-phone-number buttons.
Inline queriesAnswerInlineQueryAnswer inline queries addressed to your bot.
Message eventsOnMessageText, OnMessageDocument, OnMessagePhoto, OnMessageVideoTyped inbound messages, plus OnMessageSponsored and OnNewChat.
Raw escape hatchSendCustomRequest, OnEventSend any TDLib JSON request and observe every raw update.
ProxiesHTTP, SOCKS5, MTProtoRoute the TDLib connection through a proxy.

WhatsApp Business Cloud API

TsgcWhatsApp_Client talks to the Meta Graph API over plain HTTPS, so there is no native library to deploy and every Delphi platform is covered.

CapabilityAPINotes
Cloud API setupWhatsAppOptions.PhoneNumberId, WhatsAppOptions.TokenThe two values from your Meta application. Every call is a plain HTTPS request to the Graph API.
TextSendMessageTextText to any WhatsApp number.
Media by public linkSendMessageImage, SendMessageDocument, SendMessageAudio, SendMessageVideo, SendMessageStickerThe media lives at a public URL.
Media from a local fileSendFileImage, SendFileDocument, SendFileAudio, SendFileVideo, SendFileStickerThe component uploads the local file first, then sends it.
ReactionsSendMessageReactionReact to a received message id with an emoji.
Location and contactsSendMessageLocation, SendMessageContactCoordinates with a name and address, and contact cards.
Interactive messagesSendMessageInteractiveList, SendMessageInteractiveButtonsSelection lists and reply buttons.
TemplatesSendMessageTemplateTemplate name, language code and parameters.
Media managementUploadMedia, DownloadMedia, DeleteMediaWork with the Cloud API media store directly.
Read receiptsMarkMessageReadMark an inbound message as read.
Outbound hookOnBeforeSendMessageInspect a message before it is sent.
TLS and loggingTLSOptions, file loggingTLS configuration for the HTTPS calls, and a file log of the traffic.

How the Messages Reach You

WhatsApp pushes inbound traffic to a webhook, which the component hosts for you. Telegram needs no webhook at all, TDLib keeps its own connection and raises events.

AreaDetail
WhatsApp webhook endpointStartServer and StopServer host the Meta webhook inside your own process, configured through ServerOptions: IP, port, SSL certificate, endpoint path and verify token.
Webhook verificationOnBeforeSubscribe fires on Meta's verification request, so the endpoint answers the subscription handshake.
Inbound WhatsApp messagesOnMessageReceived delivers each inbound message, with a var aMarkAsRead argument to send the read receipt.
Delivery statusOnMessageSent reports the status of messages you sent.
Raw payloadsOnRawMessage exposes the webhook JSON exactly as Meta posted it.
Telegram updatesNo webhook needed. TDLib keeps its own connection to Telegram, and new messages arrive as events: OnMessageText, OnMessageDocument, OnMessagePhoto and OnMessageVideo.
Other Telegram eventsOnNewChat, OnNewCallbackQuery and OnMessageSponsored cover new chats, keyboard callbacks and sponsored messages.
Raw Telegram eventsOnEvent delivers every TDLib update as raw JSON.

APIs, Compilers and Targets

Official APIs, and the same source across every supported compiler.

AreaDetail
TelegramThe official TDLib (Telegram Database Library), Telegram's own client library.
WhatsAppThe WhatsApp Business Cloud API, part of the Meta Graph API, over HTTPS.
Telegram platformsThrough the native TDLib library: Windows, macOS, Linux 64-bit, Android and iOS.
WhatsApp platformsPure HTTPS, so every Delphi platform is covered.
CompilersDelphi and C++ Builder 7 through 13.
EditionsThe Telegram client also ships inside sgcWebSockets from Standard up, the WhatsApp client from Professional up, and All-Access includes everything.
LicensingStandalone. The sgcWebSockets Core runtime is bundled in and full source code is included.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Build with sgcSocial

Download the free trial and send your first Telegram or WhatsApp message from Delphi or C++ Builder.