shehrzad
(Shehrzad)
March 31, 2021, 5:31am
1
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:
Generated JWT as described within Generating JWT
Successfully initialized Instant SDK.
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):
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:
Can you try using a different session name that does not have any special characters like “_”
Does anything change when you provide a user name into the context object?
Thanks!
Michael
shehrzad
(Shehrzad)
April 2, 2021, 3:30am
3
Thank you for responding Michael,
I tried both things you suggested, unfortunately to no avail:
Removed the underscore from the session name, such that it is L"Default"
Set userName to a simple string.
Can I share my code with you? It’s an extremely simple piece of code…
Regards,
Shehrzad
shehrzad
(Shehrzad)
April 2, 2021, 11:52pm
5
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
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
shehrzad
(Shehrzad)
April 6, 2021, 12:29am
7
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
Please let us know if you have any other questions.
Thanks!
Michael
system
(system)
Closed
May 7, 2021, 5:44am
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.