gauravdev
(Gaurav)
January 23, 2023, 8:54am
1
We are currently using JWT with websdk 2.6.0. which will be deprecated in June 2023. Now we want to use server to server oauth app. I have a query regarding server to server oauth app using ZoomMtg. I am able to get Access token and Create meeting using simple api calls using server to server oauth account id, client id and client secret. Getting a response with start url, join url, meeting id, password etc. Now we want to integrate it with our web application. I am having trouble using ZoomMtg with Server to server oauth. Please help in this regard.
my previous code:
document.getElementById(‘join_meeting’).addEventListener(‘click’, function(e){
e.preventDefault();
var meetConfig = {
apiKey: API_KEY,
apiSecret: API_SECRET,
meetingNumber: MEETING_NUMBER,
// passWord: MEETING_PASSWORD,
// leaveUrl: "<%FULL_URL%>",
leaveUrl: "<%FULL_URL%>/end-session?status=error&login="+LOGIN,
userName: "<?=$_GET['name'] ?? 'Anonymous'?>",
role: <?=$_GET['role'] ?? 0?>
};
var signature = ZoomMtg.generateSignature({
meetingNumber: meetConfig.meetingNumber,
apiKey: meetConfig.apiKey,
apiSecret: meetConfig.apiSecret,
// passWord: meetConfig.passWord,
role: meetConfig.role,
success: function(res){
console.log(res.result);
}
});
ZoomMtg.init({
leaveUrl: "<%FULL_URL%>/end-session?status=finished&s_id="+SESSION_ID+"&login="+LOGIN,
// leaveUrl: "<%FULL_URL%>/"+LOGIN+"/coaching",
// leaveUrl: '<%FULL_URL%>/end-session',
isSupportAV: true,
success: function () {
ZoomMtg.join(
{
userName: meetConfig.userName,
meetingNumber: meetConfig.meetingNumber,
signature: signature,
apiKey: meetConfig.apiKey,
passWord: MEETING_PASSWORD,
success: function(res){
$('#nav-tool').hide();
console.log('join meeting success');
},
error: function(res) {
console.log(res);
}
}
);
},
error: function(res) {
console.log(res);
}
});
});
and if we can’t use ZoomMtg with Server to server oauth app. is there any other way. please help
@michael.zoom @gianni.zoom @tommy @elisa.zoom
1 Like
tommy
(Tommy Gaessler)
January 23, 2023, 4:36pm
2
Hey @gauravdev ,
You will need to use a Meeting SDK app type for the Meeting SDK credentials:
Please follow this guide: https://marketplace.zoom.us/docs/guides/build/jwt-app/jwt-app-migration/#jwt-app-type-to-sdk-app-type-migration
Best,
Tommy
1 Like
gauravdev
(Gaurav)
January 23, 2023, 4:41pm
3
Thank you tommy,
one more thing with websdk 2.6.0 we can use jwt till june 2023?
tommy
(Tommy Gaessler)
January 23, 2023, 4:53pm
4
Yes, that is the correct cut off date.
Best,
Tommy
gauravdev
(Gaurav)
January 23, 2023, 5:20pm
5
Ok. But if i need to use server to server oauth with my web application is there any ways i can use the start and join url in an iframe. Like we use in jwt. Because when i use it in an iframe they don’t work properly.
tommy
(Tommy Gaessler)
January 23, 2023, 5:48pm
6
Hey @gauravdev ,
You shouldn’t embed the Zoom Web Client in an iFrame.
You can use the Meeting SDK , and even embed that in an iFrame if you choose.
Best,
Tommy
1 Like
gauravdev
(Gaurav)
January 24, 2023, 5:18am
7
able to generate sdk signature but can’t join meeting. and there is no error in console.
and i used instant meeting id and password not passcode from my zoom profile
code using sdk app:
@tommy
var meetingConfig = {
skdKey: SDK_KEY,
sdkSecret: SDK_SECRET,
meetingNumber: MEETING_NUMBER,
passWord: MEETING_PASSWORD,
leaveUrl: “<%FULL_URL%>/end-session?status=error&login=”+LOGIN,
userName: “<?=$_GET['name'] ?? 'Anonymous'?>”,
role: <?=$_GET['role'] ?? 0?>
};
var signature = ZoomMtg.generateSDKSignature({
meetingNumber: meetingConfig.meetingNumber,
sdkKey: meetingConfig.sdkKey,
sdkSecret: meetingConfig.sdkSecret,
role: meetingConfig.role,
success: function (res) {
console.log(res.result);
meetingConfig.signature = res.result;
},
});
ZoomMtg.init({
leaveUrl: "<%FULL_URL%>/end-session?status=finished&s_id="+SESSION_ID+"&login="+LOGIN,
// leaveUrl: "<%FULL_URL%>/"+LOGIN+"/coaching",
// leaveUrl: '<%FULL_URL%>/end-session',
isSupportAV: true,
success: function () {
ZoomMtg.join(
{
skdKey: meetingConfig.skdKey,
meetingNumber: meetingConfig.meetingNumber,
passWord: meetingConfig.passWord,
userName: meetingConfig.userName,
signature: meetingConfig.signature,
success: function(res){
$('#nav-tool').hide();
console.log('join meeting success');
},
error: function(res) {
console.log(res);
}
}
);
},
error: function(res) {
console.log(res);
}
});
});
@gauravdev You are using PHP or??