Chilkat Online Tools

Go / Zoom API / Create users

Back to Collection Items

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    http := chilkat.NewHttp()
    var success bool

    req := chilkat.NewHttpRequest()
    req.SetHttpVerb("POST")
    req.SetPath("/v2/users")
    req.SetContentType("multipart/form-data")
    req.AddParam("action","ssoCreate")

    req.AddParam("user_info","ssoCreate{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}")

    req.AddHeader("Authorization","Bearer <access_token>")

    resp := http.SynchronousRequest("api.zoom.us",443,true,req)
    if http.LastMethodSuccess() == false {
        fmt.Println(http.LastErrorText())
        http.DisposeHttp()
        req.DisposeHttpRequest()
        return
    }

    sbResponseBody := chilkat.NewStringBuilder()
    resp.GetBodySb(sbResponseBody)

    jResp := chilkat.NewJsonObject()
    jResp.LoadSb(sbResponseBody)
    jResp.SetEmitCompact(false)

    fmt.Println("Response Body:")
    fmt.Println(*jResp.Emit())

    respStatusCode := resp.StatusCode()
    fmt.Println("Response Status Code = ", respStatusCode)
    if respStatusCode >= 400 {
        fmt.Println("Response Header:")
        fmt.Println(resp.Header())
        fmt.Println("Failed.")
        resp.DisposeHttpResponse()
        http.DisposeHttp()
        req.DisposeHttpRequest()
        sbResponseBody.DisposeStringBuilder()
        jResp.DisposeJsonObject()
        return
    }

    resp.DisposeHttpResponse()

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "id": "string",
    //   "first_name": "string",
    //   "last_name": "string",
    //   "email": "string",
    //   "type": "integer"
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    id := jResp.StringOf("id")
    first_name := jResp.StringOf("first_name")
    last_name := jResp.StringOf("last_name")
    email := jResp.StringOf("email")
    v_type := jResp.StringOf("type")

    http.DisposeHttp()
    req.DisposeHttpRequest()
    sbResponseBody.DisposeStringBuilder()
    jResp.DisposeJsonObject()

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'action=ssoCreate'
	--form 'user_info=ssoCreate{"email":"et qui reprehenderit","type":1,"first_name":"nostrud enim","last_name":"fugiat Excepteur of","password":"consectetur irure moll"}'
https://api.zoom.us/v2/users

Postman Collection Item JSON

{
  "name": "Create users",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "action",
          "value": "ssoCreate",
          "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
          "type": "text"
        },
        {
          "key": "user_info",
          "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/users",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "users"
      ]
    },
    "description": "Use this API to add a new user to your Zoom account. \n\n**Scopes:** `user:write:admin`, `user:write` <br> **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light` \n\n **Note:** The following rate limits apply when you use the `create` value for the `action` field: \n* 50 requests per day for **Free** accounts. \n* 1,500 requests per day for **Pro** accounts. \n* 10,000 requests per day for **Business+** accounts. \n\n**Prerequisites:** \n* A Pro or higher plan."
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `201`<br>\nUser created.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "action",
              "value": "ssoCreate",
              "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
              "type": "text"
            },
            {
              "key": "user_info",
              "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/users",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users"
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Location",
          "value": "quis officia in reprehenderit",
          "description": "Location of created User"
        },
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"id\": \"string\",\n \"first_name\": \"string\",\n \"last_name\": \"string\",\n \"email\": \"string\",\n \"type\": \"integer\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `400` <br> Bad Request \n\n **Error Code:** `300` <br> Invalid parameter: password \n\n **Error Code:** `200` <br> No privilege. <br> No permission, please contact Zoom customer support. \n\n **Error Code:** `1000` <br> The user cannot be ",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "action",
              "value": "ssoCreate",
              "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
              "type": "text"
            },
            {
              "key": "user_info",
              "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/users",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `404` **Not Found**<br><br>\n**Error Code:** `4130`<br>\nGroup does not exist: $groupId<br>",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "action",
              "value": "ssoCreate",
              "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
              "type": "text"
            },
            {
              "key": "user_info",
              "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/users",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users"
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `409`<br>User with that email already exists<br>\n**Error Code:** `1005`<br>Email $email has already been used.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "action",
              "value": "ssoCreate",
              "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
              "type": "text"
            },
            {
              "key": "user_info",
              "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/users",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users"
          ]
        }
      },
      "status": "Conflict",
      "code": 409,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    },
    {
      "name": "**HTTP Status Code:** `429` <br> You have exceeded the daily rate limit ({0}) of user invite requests permitted for this account. You may resume these requests at GMT 00:00:00.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "action",
              "value": "ssoCreate",
              "description": "(Required) The action to take to create the new user: \n* `create` — The user receives an email from Zoom containing a confirmation link. The user must then use the link to activate their Zoom account. The user can then set or change their password. \n* `autoCreate` — This action is for Enterprise customers with 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. \n* `custCreate` — Users created with this action do not have passwords and will **not** have the ability to log into the Zoom web portal or the Zoom client. These users can still host and join meetings using the `start_url` and `join_url` respectively. To use this option, you must [contact the Integrated Software Vendor (ISV) sales team](https://docs.google.com/forms/d/e/1FAIpQLSe8FundLOYp8TMptSwWYeFt7QGKlp4yw4YHilta9M0ycxdoNw/viewform). \n* `ssoCreate` — This action is provided for the enabled “Pre-provisioning SSO User” option. A user created this way has no password. If it is **not** a Basic user, a personal vanity URL with the username (no domain) of the provisioning email is generated. If the username or PMI is invalid or occupied, it uses a random number or random personal vanity URL. (This can only be one of create,autoCreate,custCreate,ssoCreate)",
              "type": "text"
            },
            {
              "key": "user_info",
              "value": "{\"email\":\"et qui reprehenderit\",\"type\":1,\"first_name\":\"nostrud enim\",\"last_name\":\"fugiat Excepteur of\",\"password\":\"consectetur irure moll\"}",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/users",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users"
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}