Question
People commonly ask on the Zoom Developer Forum:
How can I successfully manage local recording permissions for a bot using the Linux Meeting SDK, including starting local audio recording, handling the recording permission popup, automatically prompting the host for permission, and joining meetings without a password?
Answer
Managing local recording permissions for a bot using the Linux Meeting SDK involves several key steps and considerations. Here’s a comprehensive guide to address the common issues and solutions:
- Starting Local Audio Recording:
- Ensure you are using a valid
recording_token
. This token should be generated using the API endpointGET https://api.zoom.us/v2/meetings/{meeting_id}/jointoken/local_recording
with a valid access token obtained via Server-to-Server OAuth. - When joining the meeting, set the role to
1
(host) and pass therecording_token
. If you encounter logs like “CanStartRawRecording result: 2” or “Cannot start raw recording: no permissions yet, need host, co-host, or recording privilege,” it indicates that the client lacks recording privileges at join time.
- Host Authorization:
- The meeting host must authorize your app to auto-start recording via OAuth. If the host has not granted this access, the SDK will report insufficient privileges. Ensure that the host is aware of the app and has given the necessary permissions.
- Handling Recording Permission Popup:
- The recording permission prompt is shown only to the meeting host. If the bot is not receiving the prompt, verify who Zoom considers the host by checking
IUserInfo.IsHost
when participants join. - Ensure that local recording is enabled on the host’s account. If local recording is disabled, the host will not be prompted for permission, and the bot will not capture audio.
- If necessary, make other participants co-hosts, as they have the ability to grant recording permissions.
- Automatically Prompting for Recording Permission:
- Use the
onInMeeting()
method to prompt the host for recording permission as soon as the bot joins the meeting. - Implement
onIsGivenRecordingPermission()
as a callback to start recording automatically once permission is granted. - To detect when the host is present, register a
MeetingParticipantsCtrlEventListener
and check for participant events. When the host joins, invoke the method to check and start raw recording.
- Joining Meetings Without a Password:
- To join a meeting without a password, use the meeting’s join URL instead of providing the meeting ID and password. If the meeting requires authentication, authenticate the bot using a ZAK token.
- If the bot is stuck at
MEETING_STATUS_CONNECTING
, check the organization or account security settings to ensure that the meeting allows unauthenticated users or that the bot is authenticated correctly.
By following these steps, you can effectively manage local recording permissions for your bot using the Linux Meeting SDK.
Zoom Developer Forum Examples
Some examples of this question are:
- https://devforum.zoom.us/t/cannot-start-audio-recording-locally-role-1-and-i-have-rercording-token/129015
- https://devforum.zoom.us/t/recording-permission-popup-not-showing-up/126550
- https://devforum.zoom.us/t/prompt-to-record-via-headless-bot/108250
- https://devforum.zoom.us/t/how-can-a-bot-linux-meeting-sdk-join-a-meeting-without-a-password-and-then-manually-request-recording-permission-from-the-host/126550