List users API call returning OK with null Body

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

Error
When sending GET “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 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 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.

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

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

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

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

Hey @charlene.wright,

Please send an email to 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

Max,

Thank you for your help!

I have sent the requested email to developersupport@zoom.us.

Thanks,

Matt

Hey @charlene.wright,

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

Thanks,
Max

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