Chilkat Online Tools

Xojo / Zoom API / Check a user email

Back to Collection Items

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

Dim http As New Chilkat.Http
Dim success As Boolean

Dim queryParams As New Chilkat.JsonObject
success = queryParams.UpdateString("email","quis officia in reprehenderit")

// Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

Dim resp As Chilkat.HttpResponse
resp = http.QuickRequestParams("GET","https://api.zoom.us/v2/users/email",queryParams)
If (http.LastMethodSuccess = False) Then
    System.DebugLog(http.LastErrorText)
    Return
End If

Dim sbResponseBody As New Chilkat.StringBuilder
success = resp.GetBodySb(sbResponseBody)

Dim jResp As New Chilkat.JsonObject
success = jResp.LoadSb(sbResponseBody)
jResp.EmitCompact = False

System.DebugLog("Response Body:")
System.DebugLog(jResp.Emit())

Dim respStatusCode As Int32
respStatusCode = resp.StatusCode
System.DebugLog("Response Status Code = " + Str(respStatusCode))
If (respStatusCode >= 400) Then
    System.DebugLog("Response Header:")
    System.DebugLog(resp.Header)
    System.DebugLog("Failed.")

    Return
End If

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

// {
//   "existed_email": false
// }

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

Dim existed_email As Boolean
existed_email = jResp.BoolOf("existed_email")

Curl Command

curl -G -d "email=quis%20officia%20in%20reprehenderit"
	-H "Authorization: Bearer <access_token>"
https://api.zoom.us/v2/users/email

Postman Collection Item JSON

{
  "name": "Check a user email",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "GET",
    "header": [
    ],
    "url": {
      "raw": "{{baseUrl}}/users/email?email=quis officia in reprehenderit",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "users",
        "email"
      ],
      "query": [
        {
          "key": "email",
          "value": "quis officia in reprehenderit",
          "description": "(Required) The email address to be verified."
        }
      ]
    },
    "description": "Verify if a user's email is registered with Zoom.<br><br>\n\n<b>Note: </b>You can successfully check if a user is a registered Zoom user only if the user **signed up for Zoom via email and is within your account.** If you provide an email address of a user who is not in your account, the value of \"existed_email\" parameter will be \"false\" irrespective of whether or not the user is registered with Zoom. The response of this API call will not include users who joined Zoom using options such as \"Sign in with SSO\", \"Sign in with Google\" or \"Sign in with Facebook\" even if they are in the same account as yours.\n\n**Scopes:** `user:read:admin` `user:read`\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `200`<br>\nSuccess.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/email?email=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            "email"
          ],
          "query": [
            {
              "key": "email",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"existed_email\": false\n}"
    },
    {
      "name": "**HTTP Status Code:** `400` **Bad Request** <br><br>\n**Error Code:** `300`<br> Email is required.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/email?email=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            "email"
          ],
          "query": [
            {
              "key": "email",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "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:** `1001`<br>\nUser does not exist: $userId.",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/users/email?email=quis officia in reprehenderit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "users",
            "email"
          ],
          "query": [
            {
              "key": "email",
              "value": "quis officia in reprehenderit"
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}