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:
- Delete last user created on API (if exists);
- Create a new API user;
- Get Zoom token;
- Get Zoom acces token (ZAK);
- Create a new meeting, and;
- 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.
});
});
});
});