我是 zoom iOS sdk 的新手,我能够使用 iOS sdk 成功加入 Zoom 会议,但无法从 iOS sdk 开始新会议。
// API User info for starting calls as API user.
static let userID = "gurpal@relinns.com"
static let userToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6ImRGZmdMWHA2UWUyWW92QWo2TzZPZkEiLCJleHAiOjE1OTI1NzQ1MjUsImlhdCI6MTU5MjU2OTEyNn0.35Gw_qTxcgpuQ51IVa4a4JalgqIQdi2HnpmviRcJ3PE" //ZoomExternalApis.init().getUserToken(userId: "Gurpal@relinns.com")
我正在使用来自缩放仪表板的 jwt 令牌。但是当我开始与下面的代码会面时
// Start a Zoom meeting immediately.
func startMeeting(name: String = ZoomAPI.defaultName, number: Int = -1, password: String = "") {
guard isAPIAuthenticated || isUserAuthenticated, let meetingService = MobileRTC.shared().getMeetingService() else { return }
var paramDict: [String : Any] = [kMeetingParam_Username : name]
if isAPIAuthenticated && !isUserAuthenticated {
paramDict[kMeetingParam_UserID] = ZoomAPI.userID
paramDict[kMeetingParam_UserToken] = ZoomAPI.userToken
}
if number != -1 {
paramDict[kMeetingParam_MeetingNumber] = "\(number)"
}
if password.count > 0 {
paramDict[kMeetingParam_MeetingPassword] = password
}
let returnValue = meetingService.startMeeting(with: paramDict)
guard returnValue == MobileRTCMeetError_Success else {
print("Zoom: Start meeting task failed, error code: \(returnValue.rawValue)")
return
}
print("Zoom: Start meeting task completed.")
}
}
然后它给我错误“无法连接确保您已连接到互联网并且您与缩放的连接没有被防火墙或代理阻止”但一切都是正确的,因为我也能够加入会议。