# C# wrapper demo callback

**URL:** <https://devforum.zoom.us/t/c-wrapper-demo-callback/25284>\
**Category:** Windows\
**Created:** [July 27, 2020, 5:24am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284 "2020-07-27T05:24:54Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![saurabhbharadwaj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saurabhbharadwaj/32/12521_2.png) [@saurabhbharadwaj](https://devforum.zoom.us/u/saurabhbharadwaj)\
**Post date:** [July 27, 2020, 5:24am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/1 "2020-07-27T05:24:55Z")

</div>

**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](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.

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [July 29, 2020, 5:37am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/3 "2020-07-29T05:37:32Z")

</div>

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

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

```

\*\* Payload

```auto
{
	  "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

```auto
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!

---

<div class="post-metadata">

**Author:** ![saurabhbharadwaj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saurabhbharadwaj/32/12521_2.png) [@saurabhbharadwaj](https://devforum.zoom.us/u/saurabhbharadwaj)\
**Post date:** [July 30, 2020, 4:13am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/4 "2020-07-30T04:13:41Z")

</div>

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.

 ![csharpDemo](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/c/cfdc2bb838b9dbbcbfbc2cd56123173bd7a8fea2.jpeg)

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](https://github.com/zoom/zoom-c-sharp-wrapper/archive/master.zip)

Thanks,

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 1, 2020, 4:21am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/5 "2020-08-01T04:21:16Z")

</div>

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/](https://jwt.io/) or other libraries to compose the JWT token.

Hope this helps. Thanks!

---

<div class="post-metadata">

**Author:** ![ekalyvio](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ekalyvio/32/5187_2.png) [@ekalyvio](https://devforum.zoom.us/u/ekalyvio)\
**Post date:** [August 1, 2020, 8:49pm UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/6 "2020-08-01T20:49:08Z")

</div>

I am having the exact same problem.  
After generating the token from [jwt.io](http://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?

---

<div class="post-metadata">

**Author:** ![saurabhbharadwaj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saurabhbharadwaj/32/12521_2.png) [@saurabhbharadwaj](https://devforum.zoom.us/u/saurabhbharadwaj)\
**Post date:** [August 4, 2020, 4:00am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/7 "2020-08-04T04:00:46Z")

</div>

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

Thanks,

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 4, 2020, 4:43am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/8 "2020-08-04T04:43:36Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![carson.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/carson.zoom/32/785_2.png) [@carson.zoom](https://devforum.zoom.us/u/carson.zoom)\
**Post date:** [August 4, 2020, 4:44am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/9 "2020-08-04T04:44:46Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![meldur](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@meldur](https://devforum.zoom.us/u/meldur)\
**Post date:** [August 4, 2020, 2:17pm UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/10 "2020-08-04T14:17:20Z")

</div>

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 ☹

Please push me in the right direction.

---

<div class="post-metadata">

**Author:** ![saurabhbharadwaj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saurabhbharadwaj/32/12521_2.png) [@saurabhbharadwaj](https://devforum.zoom.us/u/saurabhbharadwaj)\
**Post date:** [August 5, 2020, 11:48am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/11 "2020-08-05T11:48:28Z")

</div>

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

Thanks,

---

<div class="post-metadata">

**Author:** ![saurabhbharadwaj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/saurabhbharadwaj/32/12521_2.png) [@saurabhbharadwaj](https://devforum.zoom.us/u/saurabhbharadwaj)\
**Post date:** [August 5, 2020, 11:50am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/12 "2020-08-05T11:50:03Z")

</div>

Hi,

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

Thanks,

---

<div class="post-metadata">

**Author:** ![adeyen](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@adeyen](https://devforum.zoom.us/u/adeyen)\
**Post date:** [November 16, 2020, 6:19am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/13 "2020-11-16T06:19:32Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ryan.b](https://avatars.discourse-cdn.com/v4/letter/r/a5b964/32.png) [@ryan.b](https://devforum.zoom.us/u/ryan.b)\
**Post date:** [February 1, 2021, 11:03am UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/14 "2021-02-01T11:03:28Z")

</div>

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](http://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](http://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

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [February 2, 2021, 9:42pm UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/15 "2021-02-02T21:42:43Z")

</div>

Hey @ryan.b,

Thank you for mentioning this 🙂

Michael

---

<div class="post-metadata">

**Author:** ![jean-jacques.lutz](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jean-jacques.lutz/32/20111_2.png) [@jean-jacques.lutz](https://devforum.zoom.us/u/jean-jacques.lutz)\
**Post date:** [August 3, 2021, 3:57pm UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/16 "2021-08-03T15:57:46Z")

</div>

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).

> [@C# wrapper demo client authorization callback not being called](https://devforum.zoom.us/t/c-wrapper-demo-client-authorization-callback-not-being-called/49983/10):
>
> I was able to solve this problem. Procedure Unzip zoom-c-sharp-wrapper-5.5.12511.0422.zip (Start with a clean sln) Open the file zoom\_sdk\_c\_sharp\_wrap.sln in VisualStudio Change project configuration to Release, change platform to x86 Build the solution Right-click on “zoom\_sdk\_demo” in the Solution Explorer after the build is finished Click “Set as StratUp Project” Click Start (in Visual Studio) MainWindow.xaml is shown Input token and Click Auth The guide says “Open the demo project by cli…

---

<div class="post-metadata">

**Author:** ![Michael\_Condon](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/michael_condon/32/13543_2.png) [@Michael\_Condon](https://devforum.zoom.us/u/Michael_Condon)\
**Post date:** [August 4, 2021, 7:43pm UTC](https://devforum.zoom.us/t/c-wrapper-demo-callback/25284/17 "2021-08-04T19:43:37Z")

</div>

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