Start Meeting With ZAK - Ionic - iOS

Description
Start Meeting With ZAK method doesn’t work on iOS (Ionic App).

Which version?
4.3.94401.0325

Smartphone:

  • Device: iPhone 6
  • OS: iOS 12.1

Additional context

I’m developing an hybrid app (Android and iOS) in Ionic Framework. Then, I implemented a method that executes in sequence:

  1. Delete last user created on API (if exists);
  2. Create a new API user;
  3. Get Zoom token;
  4. Get Zoom acces token (ZAK);
  5. Create a new meeting, and;
  6. Start the API user meeting with ZAK.

This method work as well in Android devices but stop on #6 item in iOS. I get this message error: Your zoom token, zoom access token, and userId are not valid.

What can I do?
Thank’s in advance.

Method

	return new Promise((_resolve, _reject) => {

			let body: ZoomMeetingCreateOptions = {
				topic: meetingTitle,
				type: 1,
				agenda: meetingDescription,
				start_time: startTime,
				timezone: 'America/Sao_Paulo',
				duration: 120,
				settings: {
					host_video: true,
					participant_video: false,
					registrants_confirmation_email: false,
					cn_meeting: false,
					in_meeting: false,
					join_before_host: true,
					mute_upon_entry: true,
					watermark: false,
					use_pmi: false,
					approval_type: 0,
					registration_type: 2,
					audio: 'both',
					enforce_login: false,
					waiting_room: false,
					close_registration: false
				}
			};

			let options = (this.platform.is('android')) ? {
				'no_driving_mode': true,
				'no_invite': true,
				'no_meeting_end_message': true,
				'no_titlebar': false,
				'no_bottom_toolbar': false,
				'no_dial_in_via_phone': true,
				'no_dial_out_to_phone': true,
				'no_disconnect_audio': true,
				'no_share': false,
				'no_audio': false,
				'no_video': false,
				'no_meeting_error_message': true
			} : null;

			new Promise((resolve) => {
				this.deleteUser();
				resolve(true);
			}).then((res) => {
				return new Promise((resolve, reject) => {
					this.createUser().then(res => {
						resolve(res);
					}).catch(err => {
						reject(err);
					});
				});
			}).then((res) => {
				return new Promise((resolve, reject) => {
					this.getZoomToken().then(res => {
						resolve(res);
					}).catch(err => {
						reject(err);
					});
				});
			}).then((res) => {
				return new Promise((resolve, reject) => {
					this.getZoomAccessToken().then(res => {
						resolve(res);
					}).catch(err => {
						reject(err);
					});
				});
			}).then((res) => {
				return new Promise((resolve, reject) => {
					let url = `${this.apiUrl}/users/${this.userId}/meetings`;
					this.http.post(url, body, {}).then((res) => {
						resolve(res);
					}).catch(err => {
						reject(err);
					});
				});
			}).then((res) => {
				return new Promise((resolve, reject) => {
					let meetingData: ZoomMeeting = JSON.parse(res['data']);
					console.log('meetingData', meetingData);
                    // PROMISE REJECTION HERE.
					this.zoomService.startMeetingWithZAK(meetingData['id'].toString(), userName, this.zoomToken, this.zoomAccessToken, this.userId, options).then((res) => {
						_resolve(res);
					}).catch(err => {
						_reject(err); // Your zoom token, zoom access token, and userId are not valid.
					});
				});
			});
		});

Hi rodrigowbt,
Thanks for using Zoom SDK. Can you also provide your Ionic info provided by ionic info as well?

Thanks!

Thanks Carson_Chen.

This is my Ionic info.

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.3
    ionic (Ionic CLI) : 3.20.1

global packages:

    cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1) 

local packages:

    @ionic/app-scripts : 3.2.3
    Cordova Platforms  : ios 5.0.1
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.4 
    ios-sim    : 8.0.1 
    Node       : v8.11.3
    npm        : 6.9.0 
    OS         : macOS High Sierra
    Xcode      : Xcode 10.1 Build version 10B61 

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Hi rodrigowbt,

Thanks for the information. I have forwarded this info to the engineer and I will get back to you asap. Thanks!

Thanks Carson_Chen. I’m waiting for it. Good job!

Hello @carson.zoom!

I have a temporary solution to my problem.

I opened a file <plugins/cordova.plugin.zoom/src/ios/Zoom.m> and comment these lines (192-198) in the function < - (void)startMeeting:(CDVInvokedUrlCommand*)command>

if (zoomToken != nil || ![zoomToken isKindOfClass:[NSString class]] || [zoomToken length] == 0 ||
		zoomAccessToken != nil || ![zoomAccessToken isKindOfClass:[NSString class]] || [zoomAccessToken length] == 0 ||
		userId != nil || ![userId isKindOfClass:[NSString class]] || [userId length] == 0) {
		pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"Your zoom token, zoom access token, and userId are not valid"];
	[self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
	return;
}

I do not know Objective-C language, so I guess that might not be a good solution.

Thanks!

Hi,

Thanks for the reply. The code snippet you are mentioning is to check the required parameters that need to start a meeting with ZAK. The following parameters are required:

  • zoomToken
  • ZAK
  • userId

Are you passing any of the above parameters and then did not pass the parameter check? If you commented this code block out, is everything work as expected?

Thanks!

Hello Carson_Chen.

That’s it. I’m passing all parameters and the code snippet doesn’t recognized them. Then, Zoom meeting not start.

I comment the code snippet and my app start a new Zoom meeting perfectly!

Thanks!

Hi,

Thanks for the info. I will pass this info to the engineer and ensure we double check the condition checker. Pardon the inconvenience caused by this.

Thanks!

Hello Carson_Chen!

Don’t worry!
Thank you for help me!

Hi @rodrigowbt, Can you post your code for the http request you make to get zoom token and zoom access token? I’ve been trying, but unable to make it work.