Getting started overview
Integrating the Zoom Video SDK involves a structured process that begins with account setup and proceeds through credential acquisition to the execution of a functional video session. This guide focuses on accelerating that initial setup to get a working proof of concept. The core steps include signing up for a Zoom developer account, creating a Video SDK app, generating necessary API credentials (SDK Key and Secret), and then utilizing these credentials to initialize the SDK and join a video session programmatically.
The SDK supports a variety of platforms, including Web, iOS, Android, Windows, macOS, React Native, Flutter, Electron, and Unity, each with specific setup instructions and code examples provided in the official Zoom Video SDK documentation. While the specific code implementation will vary by platform, the foundational steps of account and credential management remain consistent across all environments.
To summarize the quick-start process:
| Step | What to do | Where |
|---|---|---|
| 1. Sign Up | Create a Zoom account or sign in to an existing one. | Zoom Developer Portal |
| 2. Create App | Register a new Video SDK application. | Zoom Developer Portal > Build App |
| 3. Get Credentials | Obtain your SDK Key and SDK Secret. | App Dashboard > Credentials |
| 4. Install SDK | Add the Zoom Video SDK to your project. | Project dependencies (npm, CocoaPods, Gradle, etc.) |
| 5. Generate Token | Create a Session Token for authentication. | Your backend server |
| 6. Initialize & Join | Initialize the SDK client and join a video session. | Your client-side application code |
Create an account and get keys
To begin using the Zoom Video SDK, you must first establish a developer account and generate the necessary API credentials. These credentials, specifically the SDK Key and SDK Secret, are essential for authenticating your application with Zoom's services.
- Sign Up or Sign In: Navigate to the Zoom Developer Portal. If you do not have a Zoom account, you will need to create one. Existing Zoom users can sign in with their current credentials.
- Access the Dashboard: Once logged in, go to the Developer Dashboard.
- Create a New App: Click the "Build App" button. You will be prompted to choose an app type. Select "Video SDK" and provide a name for your application. This name helps you identify your project within the Developer Portal.
- Configure App Information: Follow the prompts to provide basic information about your application, such as a short description. Save your changes to proceed.
- Retrieve Credentials: After creating the app, navigate to the "Credentials" tab in your app's settings. Here, you will find your unique SDK Key and SDK Secret. These values are crucial for initializing the SDK in your application. Treat your SDK Secret as sensitive information and protect it like a password, as it grants access to your application's Video SDK usage.
- Enable Features (Optional but Recommended): Depending on your application's requirements, you might need to enable specific features or configure webhooks within your app settings. For a basic "Getting Started" scenario, the default settings and credentials are often sufficient.
The SDK Key and Secret are used to generate a Session Token on your backend server. This token is then passed to your client-side application to authenticate and join a video session. This server-side token generation approach enhances security by preventing the exposure of your SDK Secret in client-side code, aligning with common API security practices like those outlined by OAuth 2.0 security best practices.
Your first request
After obtaining your SDK Key and Secret, the next step is to make your first programmatic request to establish a video session. This involves installing the SDK, generating a Session Token, and then using that token to initialize the SDK client and join a meeting.
1. Install the SDK
The installation method varies by platform. Here are examples for Web and iOS:
Web (npm)
npm install @zoom/videosdk
iOS (CocoaPods)
Add the following to your Podfile:
pod 'ZoomVideoSDK'
Then run:
pod install
For other platforms, consult the Zoom Video SDK Get Started guide for specific installation instructions.
2. Generate a Session Token
Session Tokens are generated on your backend server using your SDK Key and SDK Secret. This token authenticates your client application to join a specific video session. The process typically involves signing a JSON Web Token (JWT) with your SDK Secret. Zoom provides sample code for various languages to assist with this process.
Here's a conceptual example of a Node.js backend generating a Session Token:
const jwt = require('jsonwebtoken');
const SDK_KEY = 'YOUR_SDK_KEY';
const SDK_SECRET = 'YOUR_SDK_SECRET';
function generateVideoSDKToken(sessionName, roleType, userId) {
const payload = {
app_key: SDK_KEY,
sdk_secret: SDK_SECRET,
mn: sessionName,
role: roleType, // 1 for host, 0 for participant
uid: userId,
iat: Math.floor(Date.now() / 1000),
exp: Math.floor(Date.now() / 1000) + (60 * 60 * 2) // Token valid for 2 hours
};
const token = jwt.sign(payload, SDK_SECRET, { algorithm: 'HS256' });
return token;
}
// Example usage:
const sessionToken = generateVideoSDKToken('my-first-session', 1, 'user123');
console.log(sessionToken);
You would expose an API endpoint on your server that your client application calls to retrieve this token.
3. Initialize the SDK and Join a Session (Web Example)
Once your client application receives the Session Token from your backend, it can initialize the Zoom Video SDK and join a session.
import ZoomVideo from '@zoom/videosdk';
// Assuming you have received the sessionToken from your backend
const sessionToken = 'YOUR_GENERATED_SESSION_TOKEN';
const sessionName = 'my-first-session';
const userName = 'Guest User';
const client = ZoomVideo.createClient();
async function initializeAndJoin() {
try {
// Initialize the client
await client.init('en-US', 'Global', { patchJsMedia: true }); // 'patchJsMedia' for browser compatibility
console.log('Zoom Video SDK client initialized.');
// Join the session
const joinResponse = await client.join(
sessionName,
sessionToken,
userName,
'' // Password (optional)
);
console.log('Joined session successfully:', joinResponse);
// You can now access local audio/video, remote participants, etc.
const stream = client.getMediaStream();
// Example: Start local video
await stream.startVideo();
const videoContainer = document.getElementById('my-video-container');
stream.renderVideo(videoContainer, client.getCurrentUserInfo().userId, 360, 240, 0, 0, 1);
} catch (error) {
console.error('Failed to initialize or join session:', error);
}
}
initializeAndJoin();
This JavaScript example demonstrates initializing the SDK with a language and data center, and then joining a named session using the generated token and a user name. It also includes a basic example of starting and rendering local video, which is a common first step in verifying a successful integration.
Common next steps
After successfully establishing a basic video session, developers typically proceed with the following common next steps to enhance functionality and user experience:
- Managing Audio and Video: Implement controls for muting/unmuting audio, starting/stopping local video, and switching cameras or microphones. The SDK provides methods for these operations through the
MediaStreamobject. - Participant Management: Develop UI elements to display a list of participants, show their audio/video status, and potentially implement host controls like muting others or removing participants.
- Screen Sharing: Integrate screen sharing capabilities, allowing users to share their desktop or specific application windows with other participants. This often requires additional browser permissions and specific SDK methods.
- Chat Functionality: Add real-time text chat within the video session, enabling participants to communicate via messages. The SDK provides APIs for sending and receiving chat messages.
- Error Handling and UI Feedback: Implement robust error handling for network issues, token expiration, or API failures. Provide clear visual feedback to users about connection status, audio/video states, and any encountered problems.
- Custom Layouts and UI: Design and implement custom video layouts beyond the default grid view. The SDK allows rendering individual participant video streams into specific HTML elements, giving full control over the user interface.
- Recording: Explore options for session recording, either cloud-based (if available via other Zoom APIs) or local recording directly from the client application, depending on your application's requirements and compliance needs.
- Backend Integration for Session Management: For more complex applications, you might integrate deeper with Zoom's API ecosystem to programmatically create and manage sessions, retrieve usage data, or manage users, often through the Zoom API Reference.
- Performance Optimization: Monitor and optimize application performance, especially in multi-participant scenarios, by managing video quality, frame rates, and resource consumption.
Troubleshooting the first call
Encountering issues during the initial setup of the Zoom Video SDK is common. Here are some troubleshooting steps and common problems to address:
- Invalid SDK Key/Secret: Double-check that the SDK Key and SDK Secret used in your token generation are correct and correspond to the Video SDK app you created in the Developer Portal. Typos are a frequent cause of authentication failures.
- Incorrect Session Token Generation:
- Expiration Time (
exp): Ensure your JWT'sexp(expiration time) is set correctly and is in the future. Tokens that have already expired will be rejected. - Algorithm: Confirm that you are signing the JWT with the
HS256algorithm, as required by Zoom. - Payload Fields: Verify that all required fields (
app_key,sdk_secret,mn,role,uid,iat,exp) are present and correctly formatted in the JWT payload. - Secret Usage: Ensure you are using the
SDK_SECRET(not the SDK Key) as the secret to sign the JWT.
- Expiration Time (
- Network Connectivity Issues:
- Check your internet connection.
- Ensure that your firewall or network proxy is not blocking connections to Zoom's servers. The SDK requires access to specific ports and domains.
- Browser Permissions (Web SDK):
- For the Web SDK, ensure your browser has granted permission for microphone and camera access. Most browsers will prompt the user, but it's worth checking browser settings if no prompt appears.
- Clear browser cache and cookies, or try in an incognito/private browsing window to rule out conflicting extensions or cached data.
- SDK Initialization Errors: Review the error messages returned by the
client.init()orclient.join()calls. These messages often provide specific clues about what went wrong. For example, an "Invalid token" error points directly to an issue with your Session Token generation. - Platform-Specific Setup: Each platform (iOS, Android, Web, etc.) has unique environment setup requirements. For instance, Android applications require specific manifest permissions, and iOS apps need
Info.plistentries for camera and microphone usage. Refer to the platform-specific Getting Started guides in Zoom's documentation. - Console Logs: Utilize your browser's developer console (for Web SDK) or IDE's logcat/debugger (for mobile/desktop SDKs) to inspect any error messages or warnings from the SDK. The Zoom SDK often outputs helpful diagnostic information.
- Check Zoom Status Page: Occasionally, issues can stem from Zoom's service status. Check the Zoom Service Status page to see if there are any ongoing outages or maintenance affecting the Video SDK.