Manage users

The first time you use the Zoom API, you will probably want to know how to add users to your account. This is our most used feature, and we’ll be walking you through how to do that now.

Before we start adding users, we should go over the difference between an account and a user.

  • An account can be thought of as the “organization” or “company.” An account is where the users live.
  • A User is an individual’s account.

We will be working with user accounts today. Most user functions live at the api.zoom.us/v2/users/ endpoint. This is where you can create and edit the settings/permissions for a user on an account.

Create a user

To get started, let’s create a user. This is pretty easy but let’s walk through the important parts.

  • Create the user - Using an authorization token, you get through OAuth or a JWT create the user by sending a request to https://api.zoom.us/v2/users. The request would look something like this if you are using NodeJS:
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.zoom.us",
  "port": null,
  "path": "/v2/users?access_token=<TOKEN>",
  "headers": {
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ action: 'create',
  user_info: 
   { email: 'string',
     type: 1,
     first_name: 'string',
     last_name: 'string',
     password: 'string' } }));
req.end();
  • The important parts here is the payload sent with the request. In this case, it is made up of the following:
  • action - How to create the new user
    • Create - User will get an email sent from Zoom. There is a confirmation link in this email. The user will then need to use the link to activate their Zoom account. The user can then set or change their password.
    • AutoCreate - This action is provided for the enterprise customer who has a managed domain. This feature is disabled by default because of the security risk involved in creating a user who does not belong to your domain.
    • custCreate - This action is provided for API partners only. A user created in this way has no password and is not able to log into the Zoom web site or client.
    • ssoCreate - This action is provided for the enabled “Pre-provisioning SSO User” option. A user created in this way has no password. If not a basic user, a personal vanity URL using the user name (no domain) of the provisioning email will be generated. If the user name or PMI is invalid or occupied, it will use a random number or random personal vanity URL.
  • UserInfo [object]
    • email - User’s email address.
    • type - User type
      • Basic
      • Pro
      • Corporate
    • first_name - User’s first name. Cannot contain more than 5 Chinese words.
    • last_name - User’s last name. Cannot contain more than 5 Chinese words.
    • password - Only used when using the Auto Create action.

You created your first user now! Wasn’t too hard, right? Well now that the user is created, what can you do with it?

Edit user settings

Let’s edit some of the user settings on the account. To update a user’s setting, you will use the https://api.zoom.us/v2/users/{userId}/settings endpoint. There are a lot of settings you can update here so let’s go over a sample request and then an overview of the settings you can edit. Here is a quick sample request in NodeJS:

var http = require("https");

var options = {
  "method": "PATCH",
  "hostname": "api.zoom.us",
  "port": null,
  "path": "/v2/users/1234567890/settings?access_token=<TOKEN>",
  "headers": {
    "content-type": "application/json"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({ schedule_meeting: { host_video: true, participants_video: true },
  in_meeting: 
   { e2e_encryption: true,
     chat: false,
     annotation: false,
     remote_control: false },
  email_notification: 
   { jbh_reminder: false,
     cancel_meeting_reminder: false,
     alternative_host_reminder: false },
  recording: 
   { local_recording: true,
     cloud_recording: false,
     record_speaker_view: false } }));
req.end();

As you can see there are a few objects here (in_meeting, email_notification, and recording) These are only a few of the objects you can add to your request to edit settings. I will go over the main settings here but for more detailed information on which settings you can edit please see our documetation on this endpoint.

Here are the following categories available to this endpoint:

  • schedule_meeting - Default schedule meeting settings for this user
  • in_meeting - In meeting settings such as e2e encyption or whether to play entry/exit chimes.
  • email_notification - Defualt email notification settings for this user.
  • recording - Default recording settings.
  • telephony - Default telephony settings for this user’s meetings.
  • feature - Which account features are available for this user.
  • tsp - Which TSP settings are default on this user’s account.

Upload a profile photo

So now you have created a user and set their default setting how you want them. How about uploading a picture so people can see who they are when talking to them through Zoom Chat or meeting with them in a Zoom video call.

var http = require("https");

var options = {
  "method": "POST",
  "hostname": "api.zoom.us",
  "port": null,
  "path": "/v2/users/123456789/picture?access_token=<TOKEN>",
  "headers": {
    "content-type": "multipart/form-data; boundary=$boundary"
  }
  formData : {"--$boundary Content-Disposition: form-data; name="pic_file"; filename="$filename"\r\nContent-Type: image/jpeg\r\n$filecontents\r\n--$boundary--"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();

If you uploaded the picture successfully, you would receive a 201 response.

And that’s it. You have created your first user from beginning to end! To get started with more of our APIs check out the rest of our quickstart guides and our API Reference.

Need help?

The first place to look is on our Developer Forum. If you can't find the answer or your request includes sensitive information, contact Developer Support.