Unable to get ZAK

Unable to get ZAK using any of these methods:

var client = new RestClient(“https://api.zoom.us/v2/users/me/zak”);
var request = new RestRequest(Method.GET);
request.AddHeader(“authorization”, “Bearer MY_JWT_API_KEY”);
IRestResponse response = client.Execute(request);
Console.Write(response.ToString());

or using this:

var client = new RestClient(“https://api.zoom.us/v2/users/MY_EMAIL/token?type=zak”);
var request = new RestRequest(Method.GET);
request.AddHeader(“authorization”, “Bearer MY_JWT_API_KEY”);
IRestResponse response = client.Execute(request);
Console.Write(response.ToString());

or using this:

var client = new RestClient(“https://api.zoom.us/v2/users/MY_EMAIL/token?access_token=MY_JWT_API_KEY&type=zak”);
var request = new RestRequest(Method.GET);
request.AddHeader(“authorization”, “Bearer MY_JWT_API_KEY”);
IRestResponse response = client.Execute(request);
Console.Write(response.ToString());

In all these methods, response.Content is blank.

Please tell me how I can get this ZAK using C# SDK ?

Hey @wbx440,

Thank you for reaching out to the Zoom Developer Forum. It looks like the issue here may have to do with authorization. Instead of providing a JWT API Key, you’ll want to make sure that you follow our guide on JWT Apps to generate a JWT token for authorization.

In my tests, this API worked with JWT and OAuth.

GET https://api.zoom.us/v2/users/me/zak

Authorization: Bearer {{ JWT TOKEN }}

Response:
{
    "token": "{{ ZAK TOKEN }}"
}

In C#, are you able to call response.Content.ToString() to get the body of the request instead?

Let me know if that helps.

Thanks,
Max

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