# List users API call returning OK with null Body

**URL:** <https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303>\
**Category:** API and Webhooks\
**Created:** [August 23, 2021, 10:26pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303 "2021-08-23T22:26:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlene.wright](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@charlene.wright](https://devforum.zoom.us/u/charlene.wright)\
**Post date:** [August 23, 2021, 10:26pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/1 "2021-08-23T22:26:38Z")

</div>

**Description**  
List users API call returns nothing in Body, with 200 (OK) status.

**Error**  
When sending GET “[https://api.zoom.us/v2/users](https://api.zoom.us/v2/users)”, response has status 200 (OK) but Body is **null**. Account has 7,884 users. Expected JSON data in Body with information for 30 of those users (because page\_size has Default of 30).

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
GET /users

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

1. Send an HTTP GET request to [https://api.zoom.us/v2/roles](https://api.zoom.us/v2/roles) with appropriate Authorization header
2. Get response with status 200 (OK) and JSON data in Body showing roles. This confirms I am sending the right Authorization header and otherwise using the API correctly.
3. Send an HTTP GET request to [https://api.zoom.us/v2/users](https://api.zoom.us/v2/users) with the same Authorization header as in step 1
4. Get response with status 200 (OK) and **null** Body that should have had JSON data with user information.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [August 24, 2021, 2:04am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/2 "2021-08-24T02:04:32Z")

</div>

Hi @charlene.wright ,

Happy to assist! Can you please share the full request URLs, bodies that you’re sending to these API endpoints and their respective responses? Blur any sensitive, unsharable information.

Thank you,  
Gianni

---

<div class="post-metadata">

**Author:** ![charlene.wright](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@charlene.wright](https://devforum.zoom.us/u/charlene.wright)\
**Post date:** [August 24, 2021, 3:31am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/3 "2021-08-24T03:31:55Z")

</div>

Gianni,

Thank you for your assistance.

Below is C# console-app code to reproduce my problem, followed by the output. As you can see, the call to /roles returns JSON; while the call to /users returns nothing.

Thanks,

Matt

**Code**

```auto
using Microsoft.IdentityModel.Tokens;
using System;
using System.IdentityModel.Tokens.Jwt;
using System.IO;
using System.Net;
using System.Text;

namespace ZoomUsers
{ // ZoomUsers

  class Program
  { // Program

    static void GetData(string path)
    { // GetData

      const string apiKey = "REDACTED";
      const string apiSecret = "REDACTED";

      string apiUrl = "https://api.zoom.us/v2/" + path;

      Console.WriteLine("Url: " + apiUrl);

      DateTime ZoomApiAuthorizationTokenExpiration = DateTime.UtcNow.AddSeconds(30);

      JwtSecurityTokenHandler tokenHandler = new JwtSecurityTokenHandler();

      string zoomApiAuthorizationToken =
        tokenHandler.WriteToken(
          tokenHandler.CreateToken(
            new SecurityTokenDescriptor
            {
                Issuer = apiKey
              , Expires = ZoomApiAuthorizationTokenExpiration
              , SigningCredentials = new SigningCredentials(
                    new SymmetricSecurityKey(Encoding.ASCII.GetBytes(apiSecret))
                  , SecurityAlgorithms.HmacSha256
                )
            }));

        HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(apiUrl);

        webRequest.Method = "GET";
        webRequest.Headers.Add("Authorization", "Bearer " + zoomApiAuthorizationToken);

        IAsyncResult asyncResult = webRequest.BeginGetResponse(null, null);

        asyncResult.AsyncWaitHandle.WaitOne();

          using (HttpWebResponse webResponse = (HttpWebResponse)(webRequest.EndGetResponse(asyncResult)))
          { // using webResponse

            Console.WriteLine("StatusCode: " + webResponse.StatusCode.ToString());
            Console.WriteLine("ContentLength: " + webResponse.ContentLength.ToString());

            if (webResponse.ContentLength > 0)
            { // get response body

              using (StreamReader reader = new StreamReader(webResponse.GetResponseStream()))
              { // using reader
      
                Console.WriteLine("Response: " + reader.ReadToEnd());
      
              } // using reader
    
            } // get response body

          } // using webResponse

          Console.WriteLine();
    
    } // GetData

    static void Main(string[] args)
    { // Main

      GetData("roles");
      GetData("users");

    } // Main

  } // Program

} // ZoomUsers

```

**Output**

```auto
Url: https://api.zoom.us/v2/roles
StatusCode: OK
ContentLength: 1117
Response: {"total_records":9,"roles":[{"id":"0","name":"Owner","description":"Account owner has full privileges to acces
s and manage a Zoom account.","total_members":1},{"id":"1","name":"Admin","description":"Admins have wide range privileg
es to access and manage a Zoom account.","total_members":6},{"id":"2","name":"Member","description":"Members have access
 to basic Zoom video meeting functions but no account management privileges.","total_members":7898},{"id":"REDACTED","name":"Video Admin","description":"Can edit Videos","total_members":9},{"id":"REDACTED","nam
e":"Report Admin","description":"Access to all Reporting","total_members":2},{"id":"REDACTED","name":"Bil
ling Admin","description":"Access to Billing Info","total_members":1},{"id":"REDACTED","name":"User Admin
","description":"Access for User Support","total_members":5},{"id":"REDACTED","name":"Security Admin","de
scription":"Manage SSO/SAML","total_members":5},{"id":"REDACTED","name":"Developer","description":"Access
 for Zoom API Development","total_members":1}]}

Url: https://api.zoom.us/v2/users
StatusCode: OK
ContentLength: -1

```

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 25, 2021, 1:15am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/4 "2021-08-25T01:15:51Z")

</div>

Hey @charlene.wright,

Please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that ticket, please provide the App Name and App Owner Email that you’re using when you see this.

I’ll use that to investigate further.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![charlene.wright](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@charlene.wright](https://devforum.zoom.us/u/charlene.wright)\
**Post date:** [August 25, 2021, 1:54am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/5 "2021-08-25T01:54:01Z")

</div>

Max,

Thank you for your help!

I have sent the requested email to [developersupport@zoom.us](mailto:developersupport@zoom.us).

Thanks,

Matt

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [August 26, 2021, 12:57am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/6 "2021-08-26T00:57:13Z")

</div>

Hey @charlene.wright,

Thank you! I’ll follow up with you there.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [September 25, 2021, 10:57am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303/7 "2021-09-25T10:57:47Z")

</div>

Closed on September 25, 2021, 10:57am UTC

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