Description
I’m fairly new to OAuth as well as Zoom dev. I’m trying to add a feature to an existing native desktop app that’ll allow users to launch zoom meetings. Thus far, I’m able to obtain an access token via OAuth and obtain a ZAK for user_id=me. But I’m unable to launch a meeting because getMeetingService() returns nil. Additionally, isAuthorized() returns ‘3’ (failure). I’d really appreciate help figuring out why.
Following the sample code, after obtaining both an access token and a zak, I initialize the meeting sdk:
ZoomSDKInitParams* params = [[ZoomSDKInitParams alloc] init];
params.needCustomizedUI = NO;
params.teamIdentifier = nil;
[[ZoomSDK sharedSDK] initSDKWithParams:params];
[[ZoomSDK sharedSDK] setZoomDomain:[NSString stringWithStdString:kDomain]];
params = nil;
Then I attempt to access the meeting service:
auto sharedSDK = [ZoomSDK sharedSDK];
auto authService = [sharedSDK getAuthService]; //debug
BOOL isAuth = [authService isAuthorized]; //debug
auto meetingService = [sharedSDK getMeetingService];
if (isAuth && meetingService)
{
ZoomSDKStartMeetingUseZakElements *params = [[ZoomSDKStartMeetingUseZakElements alloc] init];
params.zak = _mZAK;
params.userType = SDKUserType_APIUser;
params.userId = @"me";
params.displayName = @"Tester";
params.meetingNumber = 0;
params.isDirectShare = NO;
params.displayID = 0;
params.isNoVideo = NO;
params.isNoAuido = NO;
params.vanityID = nil;
ZoomSDKError ret = [meetingService startMeetingWithZAK:params];
}
Also, is the userType as well as all the param settings correct? (I’ve found any docs explaining user types very confusing)
Additionally, I’m very confused about the call flow, which I currently understand to be:
- Use OAuth to obtain an access token and zak for the user
- Init the SDK
- Get an instance of the meeting service
- Pass the zak to the meeting service to start a meeting on behalf of the user
Is this correct or am I missing steps? If this is correct, can you help me figure out why it doesn’t work for me?
And finally, even more confusing is the seemingly conflicting documentation:
According to the following page, I should be using JWT’s to authenticate the app:
But then this page displays a diagram which suggests all I have to do is what I’ve already done - authenticate the user via pkce /oauth, obtain a zak for the user, and I should be able to launch a meeting:
In fact, the client secret is encoded and appended to the access token request, which I understood meant I didn’t have to generate a JWT to send that info to zoom servers.
Also on that page(Supporting OAuth in your SDK app), the directions on requesting an access token conflict with the instructions on this page:Authentication and the api reference.
Can you please point me to the definitive and correct docs? The comments in the header files are useful for reference but are not at all instructive (and are sometimes also confusing) due to their brevity.
Which macOS Meeting SDK version?
SDK Version: 5.9.6 (5014)
MacOS version: 10.15.7
Device (please complete the following information):
Macbook Pro
Additional context
Because I searched this forum before posting:
- I did double check my project settings - all frameworks, dylibs, etc are being copied to the frameworks dir in the final product.
- I’m using domain ‘zoom.us’
- ZAK obtained via endpoint “https://api.zoom.us/v2/users/me/zak”
Thanks in advance for any help.