Question
People commonly ask on the Zoom Developer Forum:
How can I send in-meeting chat messages from a Linux Meeting SDK bot that’s capturing raw video? Is there any API to send chat without a bot? Also, why do chat sends fail from a background thread and how can I implement an event-based strategy without freezing raw recording?
Answer
You can send in-meeting chat using the Meeting SDK’s chat controller. There is no separate Zoom API to send in-meeting chat without a bot. Meeting SDK calls (including chat) must run on the main thread—sending from a background thread will fail or behave unpredictably. Use a main-loop dispatch pattern.
- Get the chat controller after the bot has joined:
m_pChatController = m_pMeetingService->GetMeetingChatController()
- Send a message to everyone from the main thread:
IChatMsgInfoBuilder\* b = meetingchatcontroller->GetChatMessageBuilder()
b->SetReceiver(0); b->SetMessageType(SDKChatMessageType_To_All); b->SetContent(L"Hello world!")
meetingchatcontroller->SendChatMsgTo(b->Build())
- Ensure calls run on the main thread:
- Do not call
SendChat...
from a background thread. - Queue messages from worker threads and dispatch them on the main thread’s event loop.
- On Linux, consider using a GLib main loop and schedule send operations with g_idle_add so they execute on the main loop (avoids freezing raw capture).
Zoom Developer Forum Examples
Some examples of this question are: