# Prompt to record via headless bot

**URL:** <https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250>\
**Category:** Meeting SDK\
**Tags:** recording\
**Created:** [April 19, 2024, 12:03pm UTC](https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250 "2024-04-19T12:03:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![management1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/management1/32/49650_2.png) [@management1](https://devforum.zoom.us/u/management1)\
**Post date:** [April 19, 2024, 12:03pm UTC](https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250/1 "2024-04-19T12:03:36Z")

</div>

@donte.zoom could you tell us that where is the event handler/code snippet for where the headless bot automatically asks for recording permissions when joining a meeting like in the headless github repo, would be really helpful if you could point us in that direction.

---

<div class="post-metadata">

**Author:** ![amanda-recallai](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/amanda-recallai/32/44747_2.png) [@amanda-recallai](https://devforum.zoom.us/u/amanda-recallai)\
**Post date:** [April 25, 2024, 4:25pm UTC](https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250/2 "2024-04-25T16:25:45Z")

</div>

Hey @management1 ,

We run meeting bots at scale and use various Zoom SDKs including the Linux Meeting SDK - happy to help any way I can!

This example repository showcases a good example of recording permission flow and recording raw audio streams: [GitHub - zoom/meetingsdk-linux-raw-recording-sample](https://github.com/zoom/meetingsdk-linux-raw-recording-sample)

Here are some particularly useful parts of the repo showing how to prompt the host for permission and starting recording:

- [`onInMeeting()`](https://github.com/zoom/meetingsdk-linux-raw-recording-sample/blob/77cd735134b6690cc7a83829ffc2f6d1ed6ed92f/demo/meeting_sdk_demo.cpp#L271) shows how to prompt the host for permission and begin recording once the bot joins the meeting
- [`onIsGivenRecordingPermission()`](https://github.com/zoom/meetingsdk-linux-raw-recording-sample/blob/77cd735134b6690cc7a83829ffc2f6d1ed6ed92f/demo/meeting_sdk_demo.cpp#L238) is an example of callback to automatically starting recording once the bot is given permission

- Since there are cases when the bot may join before the host is actually present, you’ll also want to have an event listener that listens to participant join events.
  - In this repo, the `MeetingParticipantsCtrlEventListener ` is an example of a listener with various participant event callbacks. You would want to use something like the [`MeetingParticipantsCtrlEventListener::onUserJoin`](https://github.com/zoom/meetingsdk-linux-raw-recording-sample/blob/77cd735134b6690cc7a83829ffc2f6d1ed6ed92f/demo/MeetingParticipantsCtrlEventListener.cpp#L17) callback to listen when a participant joins the call. (Note that you should register the listener to the `m_pParticipantsController` in the `JoinMeeting()` function as shown [here](https://github.com/zoom/meetingsdk-linux-raw-recording-sample/blob/77cd735134b6690cc7a83829ffc2f6d1ed6ed92f/demo/meeting_sdk_demo.cpp#L549)).
  - Then, you could check if the user that joined is the host, by using [`IUserInfo::IsHost()`](https://marketplacefront.zoom.us/sdk/meeting/linux/class_i_user_info.html#a4dd3760d6fde8ad685d39fbcb425e1b7), for example.
  - If they are the host, then you could invoke `CheckAndStartRawRecording` (Or a different implementation, depending on how you want to record).

If you didn’t want to deal with the complexities of building a meeting bot from scratch, another alternative is to use [Recall.ai](https://www.recall.ai/) instead. It’s a simple 3rd party API that lets you use meeting bots to get raw audio/video from meetings without you needing to spend months to build, scale and maintain these bots.

Let me know if you have any questions!

---

<div class="post-metadata">

**Author:** ![management1](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/management1/32/49650_2.png) [@management1](https://devforum.zoom.us/u/management1)\
**Post date:** [May 13, 2024, 7:51am UTC](https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250/3 "2024-05-13T07:51:20Z")

</div>

@amanda-recallai  
We have enabled bot joining and automatic recording via join token. We just want to check for scenario where there is no user in the meeting so that the bot leaves, which event listener should be handling. if you could be kind enough to poiny
