You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Zoom iOS SDK可加入会议但无法发起会议问题求助

Troubleshooting Zoom iOS SDK Meeting Start Failure

Hey there! It’s super frustrating when joining meetings works but starting them doesn’t—let’s break down the likely issues and fix this step by step.

First, Let’s Address the Obvious: Your JWT Token is Expired

Looking at the token you provided, its expiration timestamp (exp) is 1592574525, which translates to June 19, 2020. That token is long expired, so it’s definitely invalid for starting meetings right now. You’ll need to generate a fresh, valid JWT token from your Zoom Developer Console first.

Beyond expiration, double-check your JWT payload:

  • Ensure aud is set to "zoom.us" (required for Zoom API/SDK JWT tokens)
  • Confirm the iss value matches your Zoom SDK Key (found in your app’s settings in the Zoom Console)
  • Make sure the associated user (gurpal@relinns.com) has meeting host permissions (free Zoom users can’t start meetings via the SDK—you need a Pro/Enterprise license for the user)

Fix Parameter Mismatches & Missing Required Fields

Your current code has a few potential parameter issues:

  1. User ID Case Sensitivity: Your code uses gurpal@relinns.com as the userID, but the commented-out getUserToken call uses Gurpal@relinns.com. Zoom user IDs (emails) are case-sensitive—make sure the userID matches exactly what’s in your Zoom Account Portal.
  2. Missing Meeting Type: When starting an instant meeting, you need to explicitly specify the meeting type. Add this to your paramDict:
    paramDict[kMeetingParam_MeetingType] = MobileRTCMeetingType.instant.rawValue
    
  3. Confirm Authentication State: Your isAPIAuthenticated check relies on a custom variable—make sure it’s only set to true after the SDK confirms successful authentication via the MobileRTCAuthDelegate callback:
    func onMobileRTCAuthReturn(_ returnValue: MobileRTCAuthError) {
        if returnValue == .success {
            isAPIAuthenticated = true
        } else {
            print("Auth failed: \(returnValue)")
        }
    }
    
    Don’t try starting a meeting until this callback confirms auth success.

Check the Actual Error Code (Not Just the Generic Message)

The "Unable to connect" message is a generic fallback—pay attention to the returnValue from startMeeting(with:). Print the full error enum to get precise info:

print("Zoom: Start meeting failed, error: \(returnValue), code: \(returnValue.rawValue)")

Common error codes to look for:

  • MobileRTCMeetError_InvalidUserToken: Token is invalid/expired/missing permissions
  • MobileRTCMeetError_UserNotAllowed: The user doesn’t have host permissions to start meetings
  • MobileRTCMeetError_InvalidParam: One or more parameters (like userID, meeting type) are incorrect

Revised Start Meeting Code Example

Here’s a cleaned-up version of your function with fixes for the above issues:

func startInstantMeeting(name: String = ZoomAPI.defaultName) {
    guard let meetingService = MobileRTC.shared().getMeetingService() else {
        print("Zoom: Meeting service unavailable")
        return
    }
    
    // Verify SDK is authenticated first
    let authService = MobileRTC.shared().getAuthService()
    guard authService?.getAuthentication() == .authenticated else {
        print("Zoom: SDK not authenticated—complete auth before starting meetings")
        return
    }
    
    var paramDict: [String : Any] = [
        kMeetingParam_Username: name,
        kMeetingParam_UserID: ZoomAPI.userID, // Match Zoom portal email exactly
        kMeetingParam_UserToken: ZoomAPI.userToken, // Use fresh, valid JWT
        kMeetingParam_MeetingType: MobileRTCMeetingType.instant.rawValue // Critical for instant meetings
    ]
    
    let result = meetingService.startMeeting(with: paramDict)
    guard result == .success else {
        print("Zoom: Start meeting failed - Error: \(result), Code: \(result.rawValue)")
        return
    }
    print("Zoom: Meeting started successfully!")
}

Final Checks

  • Ensure your Zoom SDK version is up to date (old versions might have bugs with meeting initiation)
  • Confirm the device has a working internet connection (you said joining works, so this is likely fine, but double-check no VPN/firewall is blocking outgoing Zoom SDK traffic specifically for hosting)

内容的提问来源于stack exchange,提问作者relinnse

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 08:02:41