How to log the user into the MeetingsSDK

We are using the MeetingsSDK v5.12.2, having recently upgraded from 5.7, and we’re noticing an issue. We are working on building out functionality for webinars, which includes supporting the meeting setting:

Screen Shot 2022-11-01 at 11.08.31 AM

However, the ZoomSDK.isLoggedIn() method always returns false. Even when we were using v5.7 and the loginWithEmailAndPassword() method, we were still getting a result of false after logging in. The ZoomSDK.isInitialized() is working as expected, but we are unable to find documentation on how to log the user in. The ZoomSDK.tryAutoLoginZoom() method did not work.

Could you please provide guidance on how to log users into the MeetingsSDK? Without this, our users are not able to join meetings that require authentication.

@bfrisch,

Thank you for posting in the Zoom Developer Forum. You can authenticate users using Proof Key For Code Exchange (PKCE). The PKCE flow is designed to authenticate native or mobile application users. To learn more, please see our help documentation below for PKCE implementation guidance:

@donte.zoom thank you for the link, but we are already using an OAuth flow to get an access and ZAK token. After this process, the Meetings SDK itself says we are not logged in. This is not allowing us to join meetings that require authentication after going through the OAuth flow. Currently that flow looks like

Splash screen → OAuth login → Home Screen → Join Meeting Screen

By the time the Join Meeting screen is reached we have an access token, are able to obtain a ZAK token, and able to join/start all other meeting types with these tokens besides the meetings requiring authentication.

I hope this provides a bit more context. Do you have any further guidance?

1 Like

@donte.zoom I just wanted to bump this conversation so it doesn’t close.

We are still experiencing the issue where a ZAK token does not show that the user is authenticated why trying to join a meeting that requires authentication. My team has confirmed from another discussion with Zoom that the SDK PKCE is not what our issue is. We are using the ZAK token to both start and join meetings. If we are trying to join a meeting that requires authentication to join, the ZAK token is not showing that the user is authenticated when users of our app try to join the meeting.

Could you provide some guidance on how to proceed with using the ZAK token, or perhaps another means, to join an authenticated-users-only meeting?

@bfrisch,

Thank you for the tag. When you say the user is not authenticated, can you share what role is assigned to the user who is trying to join the meeting?

In the meantime, here is an additional resource with instructions on starting Zoom meetings and webinars on the Meeting SDK with a Zoom user’s ZAK token:

@donte.zoom the user of the app is a regular attendee and not the owner of the meeting, or do you mean something else by role of the user? And I took a look at the attached link and we are already following the recommended flow (Android) and still having this issue.

@bfrisch,

Thanks for the clarification on the role of the user and for confirming you are already following the recommended flow (Android). I’d like to reach out to our internal resources to get more insight into the best practices for this particular use case. It is my understanding the user should be able to join the authenticated meeting, given they successfully Zoom login in a browser when prompted. I will get back to you as soon as I learn more.

In the meantime, please share a screen recording of the entire user flow and any error messages, crash logs, or device logs you see when trying to Join an authentic meeting. Also, can you provide more context on what you mean by joining an authenticated-users-only meeting?

@donte.zoom I cannot provide screen recordings, but I can tell you the flow. We have a screen where the user is able to join a meeting or sign in, just like the desktop client. If the user tries to join a meeting requiring authentication from this page, we receive an error code 20:

Screenshot 2022-12-02 at 12.23.06 PM

which corresponds to this error code:

and this is the expected behavior, as the user is not yet authenticated. When the user clicks the sign in button, they are taken to the browser where they can sign in with their email and password. After signing in with this information, they’re taken to the home page of the app and are presented with the opportunity to join a meeting on this page as well. Attempting to join the meeting with the user’s ZAK token yields the same error code.

As for authenticated meetings, we are presented with that as a security option when creating a meeting:

This is the documentation we found to explain this feature: https://support.zoom.us/hc/en-us/articles/4406604615693-Requiring-authentication-to-join-a-meeting-webinar

@bfrisch,

Super strange. Based on the described workflow, the implementation seems correct. Without seeing the implementation (code snippet), it is difficult to be certain. One thing that seems odd is that the “ZAK token does not show that the user is authenticated when users of our app try to join the meeting”. I want to ask clarifying questions to understand better what may be happening. See questions below :

Clarifying questions :

  1. In the v5.7 implementation, is it also the case that it is not showing authenticated when users of your app try to join the meeting?

  2. Could you let me know if you’re having the same error when the user is the host of the meeting?

  3. Was the meeting started when the user tried to join?

  4. Have you tried using the Zoom SDK in a simple test application to isolate any potential issues?

  5. Have you tried using the Zoom SDK in a different language or framework to see if the problem is specific to your current development environment?

  6. Can you confirm whether or not you have registration and require the user to be authenticated security settings enabled?

Authorization

Managing meeting and webinar registration

https://support.zoom.us/hc/en-us/articles/360054446052-Managing-meeting-and-webinar-registration

Can you share the support ticket associated with the discussion your team had with Zoom? I’d like to take a closer look at what was discussed and tested during that support call.

That aside, I should note that the ZAK token is only needed to start a meeting, not join.

Get a user’s ZAK token

https://marketplace.zoom.us/docs/sdk/native-sdks/auth/#2-get-a-users-zak-token

Additional resources :

Authentication ---- Non-login / API User

https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/start-join-meeting/api-user/authentication

Join Meeting Only

https://marketplace.zoom.us/docs/sdk/native-sdks/android/mastering-zoom-sdk/start-join-meeting/join-meeting

1 Like

We figured out when building an simple test application that you do in fact need the ZAK token for this to work. The class JoinMeetingParam4WithoutLogin, which extends JoinMeetingParams and adds a field for the user’s ZAK token, needed to be used as the params type instead so we can pass the ZAK token in. This is done in the sample app that comes with the SDK, specifically in the ApiUserStartMeetingHelper class. An object of this class can then be passed to the meetingService.joinMeetingWithParams(context, params, opts) method and the user will be considered authenticated for meetings requiring authentication.

It would be helpful to include this in the documentation. I see what you mean by the ZAK token always being needed to start a meeting but not always to join, but there are definitely some cases (like this) where the ZAK token is also needed to join. Adding a note to the Authorization page you linked might be helpful, but it would be especially useful in the Authentication and Join Meeting Only documentation, where this scenario would come into play.

1 Like

@bfrisch ,

It’s great to hear that the issue has been resolved. I agree that updating the documentation to include the caveat would be beneficial. I will submit a request to have it updated [DEVS-3585]. If you have any additional feedback, please let me know.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.