Jericho / ZoomNet

.NET client library for the Zoom.us REST API v2
MIT License
69 stars 46 forks source link

Allow for creating a meeting using a default password #281

Open mxswd opened 1 year ago

mxswd commented 1 year ago

When creating a meeting there are 3 security options, and you must pick at least one.

If you use the API to create a meeting these security options don't match the API 1-to-1, but rather you need to combine certain options to trick zoom into working the way you want.

It seems if you want:

  1. To allow participants to join before the host
  2. Disable waiting room
  3. Don't require authentication
Screenshot 2023-04-08 at 11 32 02 AM

You need to send a request with:

  1. join_before_host set to true.
  2. jbh_time set to an integer.
  3. waiting_room set to false.
  4. A password set.

Admin's have an array of options to configure meeting password strength so the API provides a convenient default_password option so you don't need to lookup the account password options and generate one that matches those rules yourself.

Screenshot 2023-04-08 at 11 37 11 AM

I'm basing this off the light amount of documentation on:

https://developers.zoom.us/docs/api/rest/reference/zoom-api/methods/#operation/meetingCreate

And significant testing on my side.

Jericho commented 1 year ago

Makes a lot of sense to enable developers to request the password to be auto-generated.

Also, I'm intrigued by this comment you made:

When creating a meeting there are 3 security options, and you must pick at least one.

What happens if a developer attempts to create a meeting but does not pick any of the options? Do they get a clear error message from Zoom? If not, is this something we should validate in ZoomNet? FYI: my attitude regarding validation has been to avoid it as much as possible because who knows if/when the validation rules in the Zoom API change and I would hate to enforce some validation rule that makes sense today but may or may not still be valid in the future. Having said that, I'm willing to make exceptions if there are situations that cause confusion, unclear error messages, unexpected outcome, etc.

mxswd commented 1 year ago

I did some testing it seems if you try to pick none of the options it will force the waiting room option. For example if you send this request:

await zoomClient.Meetings.CreateScheduledMeetingAsync(userId, calendarEvent.Summary, calendarEvent.Description, calendarEvent.DtStart.ToTimeZone("AUS Eastern Standard Time").Value, calendarEvent.Duration.Minutes, ZoomNet.Models.TimeZones.Australia_Sydney, settings: new ZoomNet.Models.MeetingSettings {
    JoinBeforeHost = true,
    WaitingRoom = false,
    ApprovalType = ZoomNet.Models.ApprovalType.None,
    UsePmi = false
});

It ignores the WaitingRoom = false and you get a meeting with waiting room enabled. And if you add the default_password flag to this API call you get a meeting with WaitingRoom disabled and passcode enabled.