joinSession() always returns NULL

Description
Trying to follow the guidelines documented within “Create, join, and leave a session” but joinSession() method returns failure.

Which Desktop Video SDK version?
zoom-instant-sdk-windows-1.0.2

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Generated JWT as described within Generating JWT
  2. Successfully initialized Instant SDK.
  3. m_pSession = m_pInstantSDK->joinSession(sessionContext) returns nullptr, meaning it can’t create the session.

Screenshots
If applicable, add screenshots to help explain your problem.

Device (please complete the following information):

  • OS: Windows 10

Additional context
Code is pretty simple:

ZOOMINSTANTSDK::ZoomInstantSDKSessionContext sessionContext;
sessionContext.sessionName = L"_Default";
sessionContext.token = L"*SNIP*";
if (nullptr == (m_pSession = m_pInstantSDK->joinSession(sessionContext)))
    // display error
else
  // continue

Of course, replace SNIP with my actual token copied from the jwt.io site.

My payload for generating the JWT follows:

{
“appKey”: “SNIP”,
“version”: 1,
“iat”: 1617164636,
“exp”: 1617246038,
“tokenExp”: 1617246038,
“tpc”: “_Default”
}

The appKey comes from my App Marketplace Credentials. I also paste my SDK secret into the appropriate signature field.

What am I doing wrong?

Hey @shehrzad,

Thanks for using the dev forum!

That is strange, but I have two ideas:

  1. Can you try using a different session name that does not have any special characters like “_”
  2. Does anything change when you provide a user name into the context object?

Thanks!
Michael

Thank you for responding Michael,

I tried both things you suggested, unfortunately to no avail:

  1. Removed the underscore from the session name, such that it is L"Default"
  2. Set userName to a simple string.

Can I share my code with you? It’s an extremely simple piece of code…

Regards,

Shehrzad

Hey @shehrzad,

Yep definitely.

Michael

Great @Michael. You can d/l a Visual Studio 2019 zipwad from here. The project relies on the zoom-instant-sdk-windows-1.0.2 folder being parallel to ZoomTest.

If you set a breakpoint on line 125 of ZoomTestDlg.cpp, and step over, you’ll see that the session join always returns NULL :frowning:

Any help you can provide would be great.

Also, one of the reasons that drew me to the Instant SDK was the ability to gain access to the remote end’s raw video pixel buffer. So I know that a Zoom session isn’t the same as a Zoom meeting. My question is, is it possible to get access to an individual user’s decoded pixels in a bona-fide Zoom meeting using the Zoom SDK (i.e. zoom-sdk-windows-5.4.54802.0124)?

Looking forward to your reply…

Thanks in advance,

Shehrzad

Hey @shehrzad,

I added the latest version of the SDK to your application and ran it. I had a couple of mistakes in my JWT payload, but when I fixed them it was returning successfully. Here is the payload I used:

{
  "appKey": "myKey",
  "version": 1,
  "user_identity": "AAAT1876",
  "iat": 1617657607,
  "exp": 1617743986,
  "tpc": "_Default"
}

Is it possible your times were invalid at the time you ran it? Here are a couple other things to double-check if you use JWT.io:

  • Copy the JWT directly, do not copy the JWT from the “Share JWT” button
  • Make sure you leave “secret base64 encoded” unchecked.

This is currently not supported for developers.

Thanks!
Michael

Thanks @Michael_Condon ,

Indeed I believe it was an incorrect date problem, and/or that sessionContext.sessionName must match “tpc” in JWT payload. Now the session is created!

Thanks again,

Shehrzad

Hey @shehrzad,

Awesome! I am super happy to hear :slight_smile:
Please let us know if you have any other questions.

Thanks!
Michael