How to build a Meeting SDK join link
The Meeting SDK allows developers to embed the Zoom Meeting or Webinar experience in their webpage or apps.
Once you have built your implementation, how do you get your users into your meeting? Well since your it's your webpage or app that your users are using, it's up to you to decide your user experience. Users could open your app when it's time to join the meeting and navigate to your join meeting flow. Or, you could build a join link and send that to your users or add it to your calendar invites, so users can join into your Meeting SDK meeting easier.
Here is an example of how to build a Meeting SDK join link:
-
Get your Meeting details like the meeting number and passcode. For this particular meeting, let's say the meeting number is
12345678910and the passcode isabc123. -
Now that we have the meeting number and passcode, let's define a URL convention. This URL should link to your join flow, with the meeting and passcode information.
- Location:
https://meetingsdk.dev/clientview/ - URL Params:
?meeting={MEETING_NUMBER}&passcode={MEETING_PASSCODE}
- Location:
-
Once the user lands on this URL, we need to abstract the meeting number and passcode from the URL, and pass the values into our Meeting SDK join function. Make sure to validate the URL parameters.
import { ZoomMtg } from "@zoom/meetingsdk"; ZoomMtg.preLoadWasm(); ZoomMtg.prepareWebSDK(); const urlParams = new URLSearchParams(window.location.search); const preSetMeeting = urlParams.get("meeting"); const preSetpasscode = urlParams.get("passcode"); if (!preSetMeeting || !preSetpasscode) { console.log("invalid join link"); } else { // get Meeting SDK JWT TOKEN // pass in the join link values, token, and username to the join function ZoomMtg.init({ leaveUrl: leaveUrl, // https://example.com/thanks-for-joining success: (success) => { ZoomMtg.join({ sdkKey: SDK_KEY, signature: TOKEN, // role in SDK signature needs to be 1 meetingNumber: preSetMeeting, passWord: preSetpasscode, userName: "Tommy", success: (success) => { console.log(success); }, error: (error) => { console.log(error); }, }); }, error: (error) => { console.log(error); }, }); }You'll see I am hard coding
Tommyas the user's name. You could also add a user name URL parameter, or if your application knows the who the user is, simply pass in their name to the join function. -
If successful, the user will now be in a meeting.
This same concept can be applied to native applications using custom URL schemes. Here is an example for iOS.