Getting started with TMS FNC WhatsApp Receiver
Prerequisites
- TMS FNC Core and TMS FNC WebSocket installed and the runtime packages added to the project.
- A WhatsApp Business API account and a configured webhook URL pointing to your server.
Add the component
- Drop
TTMSFNCWhatsAppReceiver from the TMS FNC WebSocket palette page onto a form, or create one at runtime.
- Set
Port to the port your webhook relay listens on.
- Set
Active := True to start receiving, or call Start from code.
Handle incoming messages
{ Assign OnWhatsAppMessageReceived to process incoming WhatsApp messages: }
procedure TForm1.WhatsAppReceiver1WhatsAppMessageReceived(Sender: TObject;
AMessage: TTMSFNCWhatsAppReceiverMessage);
begin
Memo1.Lines.Add('From: ' + AMessage.From.PhoneNumber);
if Assigned(AMessage.Text) then
Memo1.Lines.Add('Text: ' + AMessage.Text.Body);
end;
Next steps
- Guides — message types, media handling, and contact parsing.
- API reference — full class, property, method, and event reference.