Best practices for using SDK and REST API simultaneously

There are some features that are not supported by the SDK, contacts for example. The documented solution for this is to use the REST API. But I haven’t found any good suggestions in this forum for how to use the SDK and REST API simultaneously while only requiring the user to login once. Is this even possible?

If the user logs in with ZoomSDK.loginWithZoom(email, password), is there a way to obtain an access token for the already logged in user that can be used with the REST API?

Similarly, if the user were to log in with OAuth for access to the REST API, is there a way to log in to the SDK transparently with the OAuth access token? I see another method called ZoomSDK.loginWithSSOToken(token), but from what I’ve read, this is not what this method is used for.

If neither is possible, are either of these options on any future roadmaps?

Thanks in advance!

Hi @vuzix_greg, thanks for the post.

When you are using the REST API, you can access the ZAK token for the user who has authenticated through OAuth. This can be passed into the SDK to start a meeting through the steps mentioned in our documentation here.

If the user logs in with ZoomSDK.loginWithZoom(email, password), is there a way to obtain an access token for the already logged in user that can be used with the REST API?

This login flow is currently specific to the SDK, so any sort of credentials returned are not exposed.

Similarly, if the user were to log in with OAuth for access to the REST API, is there a way to log in to the SDK transparently with the OAuth access token? I see another method called ZoomSDK.loginWithSSOToken(token), but from what I’ve read, this is not what this method is used for.

Correct. The SSO token is a different token entirely. You can retrieve the user’s ZAK token through the REST API and then use that to start or join a meeting as an authenticated user.

Is there anything in particular you are looking to accomplish as an authenticated user through the SDK which was not covered in this reply? Let me know and I will be happy to help. :slightly_smiling_face:

Thanks!

1 Like

Thanks for the reply @jon.zoom! Very helpful.

So if someone were to authenticate through OAuth and always pass in the Zoom Access Token whenever joining/starting a meeting, there isn’t really a need to login to the SDK at all is there? Maybe if you want to list your scheduled meetings through the SDK? But you could always switch over to REST and get the same information.

In particular, I’m looking for a way to do direct calling to a contact, just like you can do with the desktop Zoom app. As far as I can tell, there is no way to do this from the SDK. If I’m wrong, please correct me!

Hi @vuzix_greg,

I’m glad I was able to help!

So if someone were to authenticate through OAuth and always pass in the Zoom Access Token whenever joining/starting a meeting, there isn’t really a need to login to the SDK at all is there? Maybe if you want to list your scheduled meetings through the SDK? But you could always switch over to REST and get the same information.

You are absolutely correct. This method of authentication means that there is no statefulness tied to the SDK surrounding user login. I would definitely recommend using the REST API for meeting management!

In particular, I’m looking for a way to do direct calling to a contact

There is currently no way to do this through the SDK alone. I’m not sure if there is a webhook that would allow you to achieve this behavior, but the API and Webhooks category would be a great place to ask! Otherwise, this would require some sort of backend implementation to handle sending out the notification for the call, upon which you could use the SDK to join.

Thanks!

1 Like

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