C# wrapper demo callback

Description
C# Wrapper demo app, the callbacks never hits

Which version?
Visual studio 2015/2017

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

  1. I followed the exact steps mentions here:- https://marketplace.zoom.us/docs/sdk/native-sdks/windows/c-sharp-wrapper. Though I could see the “h” folder and bin folder already having the required files. I tried with replacing the files as well.

When I run the application, no matter what I enter in App Token field, On pressing the Auth button, the callback are never hit and it doesnt moves forward from that point.
I have tried this in VS 2015/ Vs 2017 Win 10 platform. I have also tried with/without building the wrapper project.

Hi @saurabhbharadwaj,

Thanks for using Zoom SDK. If you are trying to run the demo app in the C# wrapper, here are the steps:

  • Download the C# wrapper and navigate to zoom_sdk_demo, click on zoom_sdk_demo.csproj to launch the project
  • Set the Solution Configuration to be “Release” and Solution Platform to be “x86”, then build the app
  • In the Auth page, use the following template to compose your payload for SDK initialization:

** Header

{
  "alg": "HS256",
  "typ": "JWT"
}

** Payload

{
	  "appKey": "string", // Your SDK key
         "iat": long, // access token issue timestamp
         "exp": long, // access token expire timestamp
         "tokenExp": long // token expire timestamp, MIN:30 minutes
}

The minimum value of tokenExp should be at least 30 minutes, and exp should be later than tokenExp, otherwise, SDK will reject the authentication request.
** Signature

HMACSHA256(
  base64UrlEncode(header) + "." +
  base64UrlEncode(payload),
  "Your SDK secret here"
)

I have just tried the above steps with the demo app and the callbacks could be triggered. Please have a try.

Thanks!

Hi,
Thanks a lot for looking into this and providing your much needed help.
It seems I may be missing something as I am not able to find any Auth page in the zoom_sdk_demo project. I am not even able to find anything in the code which would allow me to pass in the Header and other values.

I have attached the screen shot of the visual studio solution explorer(VS 2017) when the project is opened.

I have downloaded the project from this location:-
https://github.com/zoom/zoom-c-sharp-wrapper/archive/master.zip

Thanks,

Hi @saurabhbharadwaj,

Thanks for the reply. If you are looking for a way to generate the JWT token, the part of generating the JWT token is not done in the sample code. You may leverage https://jwt.io/ or other libraries to compose the JWT token.

Hope this helps. Thanks!

I am having the exact same problem.
After generating the token from jwt.io by also entering correct API key, the callbacks of the wrapper do not seem to work at all.
I also tried and copied all the DLLs from the sdk to the target directory of the application to ensure that no DLL is missing but I get nothing.
Any idea?

Its still now working.
I generated the token by following the steps mentioned above (from https://jwt.io/).
I assume that it should anyhow hit the call back even if the token is incorrect, error handle though.

Thanks,

Hi @ekalyvio,

Thanks for the reply. The JWT token for SDK should be generated from SDK key/secret instead of API key/secret.

If you are running the C# wrapper demo app, you do not need to modify the DLLs.

Hope this helps. Thanks!

Hi @saurabhbharadwaj,

Thanks for the reply. If the SDK auth is not a success, it should return an error code. Could you provide the payload of your JWT token?

Thanks!

The same on my side - the result value is allways “SDKERR_UNINITIALIZE”. This is my payload (I replaced the last 5 characters):

{
“appKey”: “”,
“iat”: 1596549322,
“exp”: 1599915730,
“tokenExp”: 1599915730
}

and my verification:

HMACSHA256(
base64UrlEncode(header) + “.” +
base64UrlEncode(payload),

) secret base64 encoded

C#
param.jwt_token = “”;
var auth = ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.GetAuthServiceWrap().SDKAuth(param);
Console.WriteLine(auth.ToString());

The fist key is my AppKey and the second one the SecretKey. The encoded token is not accepted :frowning_face:

Please push me in the right direction.

Its working now for me. Probably I was doing some mistake while generating the token it seems.
Thanks a ton for your help.

Thanks,

Hi,

The first key needs to be the SDK Key and option “secret base64 encoded” unchecked.

Thanks,

Hello Zooms,

Now, I am able to use the token to run demo on C++.
However, when running on C# wrapper, it the login callback didn’t response. It 's just disappear.
Any idea?

Old post I know but this helped me solve my issue so maybe if someone else stumbles on this there may be value.

First off to stress that you should be using the SDK Credentials not the developer.zoom.us API ones. I lost a lot of time before realising I was using the wrong ones.

It still wouldnt work however. On jwt.io the page will load with a “iat” field in the payload. This is not the current date time so be sure to manually update that.

Working for me now.

Thanks for your help

Hey @ryan.b,

Thank you for mentioning this :slight_smile:

Michael

You might want to have a look here. It worked for me, and the proposed solution is so simple (It seems as if we need to rebuild the wrapper).

Thank you for providing this @jean-jacques.lutz :slight_smile:
Michael