# List users API call returning OK with null Body (Reopen)

**URL:** <https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759>\
**Category:** API and Webhooks\
**Created:** [September 30, 2022, 11:49am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759 "2022-09-30T11:49:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbressette](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sbressette](https://devforum.zoom.us/u/sbressette)\
**Post date:** [September 30, 2022, 11:49am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/1 "2022-09-30T11:49:54Z")

</div>

I am having the exact same issue as this [Post](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body/56303) but the solution was not posted and the email address for [developersupport@zoom.us](mailto:developersupport@zoom.us) returns “This email address is no longer used by our Developer Relations team. We instead suggest using the Developer Support site or check out our Developer Forum”.

Does anyone know the solution?

Here is the content from the original post that is now closed:

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

**Error**  
When sending GET “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 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 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:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 30, 2022, 2:12pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/2 "2022-09-30T14:12:05Z")

</div>

@sbressette ,

Welcome to the Developer Forum – happy to help. Just tested the Get users endpoint with JWT and can confirm all users were returned. Here is how the request was configured :

 ![Screen Shot 2022-09-30 at 10.09.28 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/7/b7a12fa13bd3040ee44232f86a7391f29731ef99.png)

Can you share a screenshot of how you are making your request?

Best,  
Donte

---

<div class="post-metadata">

**Author:** ![sbressette](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sbressette](https://devforum.zoom.us/u/sbressette)\
**Post date:** [September 30, 2022, 3:21pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/3 "2022-09-30T15:21:14Z")

</div>

Hi Donte,

I recreated the same code from prior post in a C# console app. I can send it to you or you can review it from the prior post.

I definitely get an access token but the returned body is null. I wished I could tell you more, but that is all the information I have.

My assumption is that the issue was resolved for the prior post, we just need to know what that solution was. Is there any chance you can research what happened there?

Thanks,  
Scott

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [September 30, 2022, 3:42pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/4 "2022-09-30T15:42:04Z")

</div>

@sbressette ,

> [@sbressette](#):
>
> My assumption is that the issue was resolved for the prior post, we just need to know what that solution was. Is there any chance you can research what happened there?

Are you saying the request is working as expected? Can you share a snippet of how you are making the request?

---

<div class="post-metadata">

**Author:** ![sbressette](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sbressette](https://devforum.zoom.us/u/sbressette)\
**Post date:** [September 30, 2022, 5:29pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/5 "2022-09-30T17:29:57Z")

</div>

NO. IT IS NOT WORKING. I am referring the post that I linked from your forum that has the exact issue without a solution. If you would just look at it and find out what the solution was and post it here, you could help me an anyone else that has this issue in the future.

## Here is the code from the prior post.

using Microsoft.IdentityModel.Tokens;  
using System;  
using System.IdentityModel.Tokens.Jwt;  
using [System.IO](http://System.IO);  
using [System.Net](http://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

---

<div class="post-metadata">

**Author:** ![sbressette](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sbressette](https://devforum.zoom.us/u/sbressette)\
**Post date:** [October 28, 2022, 3:53pm UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/6 "2022-10-28T15:53:24Z")

</div>

I figured it out. There is a limit to how much data it will return. We have over 500 users and that appears too be too large. Instead of getting an error code back, you’ll get a success code but a null response.

Hopefully this helps the next person this happens too.

---

<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:** [November 1, 2023, 7:30am UTC](https://devforum.zoom.us/t/list-users-api-call-returning-ok-with-null-body-reopen/76759/7 "2023-11-01T07:30:02Z")

</div>

Closed on November 1, 2023, 7:30am UTC

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