Chilkat Online Tools

unicodeC / Zoom API / Create a recording registrant

Back to Collection Items

#include <C_CkHttpW.h>
#include <C_CkHttpRequestW.h>
#include <C_CkHttpResponseW.h>
#include <C_CkStringBuilderW.h>
#include <C_CkJsonObjectW.h>

void ChilkatSample(void)
    {
    HCkHttpW http;
    BOOL success;
    HCkHttpRequestW req;
    HCkHttpResponseW resp;
    HCkStringBuilderW sbResponseBody;
    HCkJsonObjectW jResp;
    int respStatusCode;
    const wchar_t *registrant_id;
    int id;
    const wchar_t *topic;
    const wchar_t *share_url;

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

    http = CkHttpW_Create();

    req = CkHttpRequestW_Create();
    CkHttpRequestW_putHttpVerb(req,L"POST");
    CkHttpRequestW_putPath(req,L"/v2/meetings/:meetingId/recordings/registrants");
    CkHttpRequestW_putContentType(req,L"multipart/form-data");
    CkHttpRequestW_AddParam(req,L"email",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb");

    CkHttpRequestW_AddParam(req,L"first_name",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostrud");

    CkHttpRequestW_AddParam(req,L"status",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenied");

    CkHttpRequestW_AddParam(req,L"last_name",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniam");

    CkHttpRequestW_AddParam(req,L"address",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor min");

    CkHttpRequestW_AddParam(req,L"city",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt labore");

    CkHttpRequestW_AddParam(req,L"country",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididunt");

    CkHttpRequestW_AddParam(req,L"zip",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit do");

    CkHttpRequestW_AddParam(req,L"state",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderit");

    CkHttpRequestW_AddParam(req,L"phone",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequat");

    CkHttpRequestW_AddParam(req,L"industry",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea in");

    CkHttpRequestW_AddParam(req,L"org",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempor");

    CkHttpRequestW_AddParam(req,L"job_title",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollit");

    CkHttpRequestW_AddParam(req,L"purchasing_time_frame",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month");

    CkHttpRequestW_AddParam(req,L"role_in_purchase_process",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month");

    CkHttpRequestW_AddParam(req,L"no_of_employees",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000");

    CkHttpRequestW_AddParam(req,L"comments",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut");

    CkHttpRequestW_AddParam(req,L"custom_questions",L"ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut[{\"title\":\"Ut ut\",\"value\":\"dolore mollit\"},{\"title\":\"do officia ex pariatur\",\"value\":\"proident\"}]");

    CkHttpRequestW_AddHeader(req,L"Authorization",L"Bearer <access_token>");

    resp = CkHttpW_SynchronousRequest(http,L"api.zoom.us",443,TRUE,req);
    if (CkHttpW_getLastMethodSuccess(http) == FALSE) {
        wprintf(L"%s\n",CkHttpW_lastErrorText(http));
        CkHttpW_Dispose(http);
        CkHttpRequestW_Dispose(req);
        return;
    }

    sbResponseBody = CkStringBuilderW_Create();
    CkHttpResponseW_GetBodySb(resp,sbResponseBody);

    jResp = CkJsonObjectW_Create();
    CkJsonObjectW_LoadSb(jResp,sbResponseBody);
    CkJsonObjectW_putEmitCompact(jResp,FALSE);

    wprintf(L"Response Body:\n");
    wprintf(L"%s\n",CkJsonObjectW_emit(jResp));

    respStatusCode = CkHttpResponseW_getStatusCode(resp);
    wprintf(L"Response Status Code = %d\n",respStatusCode);
    if (respStatusCode >= 400) {
        wprintf(L"Response Header:\n");
        wprintf(L"%s\n",CkHttpResponseW_header(resp));
        wprintf(L"Failed.\n");
        CkHttpResponseW_Dispose(resp);
        CkHttpW_Dispose(http);
        CkHttpRequestW_Dispose(req);
        CkStringBuilderW_Dispose(sbResponseBody);
        CkJsonObjectW_Dispose(jResp);
        return;
    }

    CkHttpResponseW_Dispose(resp);

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

    // {
    //   "registrant_id": "veniamKIW1Sonseq",
    //   "id": 12345666,
    //   "topic": "cupidatat dolore quis minim aliquip",
    //   "share_url": "https://zoom.us/recording/share/IpAAABBBBBBA1aqqkzFFgiJ2jpR"
    // }

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

    // Chilkat functions returning "const char *" return a pointer to temporary internal memory owned and managed by Chilkat.

    registrant_id = CkJsonObjectW_stringOf(jResp,L"registrant_id");
    id = CkJsonObjectW_IntOf(jResp,L"id");
    topic = CkJsonObjectW_stringOf(jResp,L"topic");
    share_url = CkJsonObjectW_stringOf(jResp,L"share_url");


    CkHttpW_Dispose(http);
    CkHttpRequestW_Dispose(req);
    CkStringBuilderW_Dispose(sbResponseBody);
    CkJsonObjectW_Dispose(jResp);

    }

Curl Command

curl -X POST
	-H "Authorization: Bearer <access_token>"
	-H "Content-Type: multipart/form-data"
	--form 'email=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb'
	--form 'first_name=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostrud'
	--form 'status=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenied'
	--form 'last_name=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniam'
	--form 'address=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor min'
	--form 'city=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt labore'
	--form 'country=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididunt'
	--form 'zip=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit do'
	--form 'state=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderit'
	--form 'phone=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequat'
	--form 'industry=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea in'
	--form 'org=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempor'
	--form 'job_title=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollit'
	--form 'purchasing_time_frame=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
	--form 'role_in_purchase_process=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month'
	--form 'no_of_employees=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000'
	--form 'comments=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut'
	--form 'custom_questions=ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpbin Lorem nostruddenieddeserunt veniamcupidatat tempor minut deserunt laboremollit incididuntexercitation Duis elit dosint reprehenderitdeserunt ut pariatur consequatea intempordolore id mollitWithin a month5,001-10,000est veniam nostrud ut[{"title":"Ut ut","value":"dolore mollit"},{"title":"do officia ex pariatur","value":"proident"}]'
https://api.zoom.us/v2/meetings/:meetingId/recordings/registrants

Postman Collection Item JSON

{
  "name": "Create a recording registrant",
  "request": {
    "auth": {
      "type": "oauth2"
    },
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "value": "multipart/form-data"
      }
    ],
    "body": {
      "mode": "formdata",
      "formdata": [
        {
          "key": "email",
          "value": "ytjjUxrx24f2i@IEOZkDxSnqnLEbZ.pkpb",
          "type": "text"
        },
        {
          "key": "first_name",
          "value": "in Lorem nostrud",
          "type": "text"
        },
        {
          "key": "status",
          "value": "denied",
          "type": "text"
        },
        {
          "key": "last_name",
          "value": "deserunt veniam",
          "type": "text"
        },
        {
          "key": "address",
          "value": "cupidatat tempor min",
          "type": "text"
        },
        {
          "key": "city",
          "value": "ut deserunt labore",
          "type": "text"
        },
        {
          "key": "country",
          "value": "mollit incididunt",
          "type": "text"
        },
        {
          "key": "zip",
          "value": "exercitation Duis elit do",
          "type": "text"
        },
        {
          "key": "state",
          "value": "sint reprehenderit",
          "type": "text"
        },
        {
          "key": "phone",
          "value": "deserunt ut pariatur consequat",
          "type": "text"
        },
        {
          "key": "industry",
          "value": "ea in",
          "type": "text"
        },
        {
          "key": "org",
          "value": "tempor",
          "type": "text"
        },
        {
          "key": "job_title",
          "value": "dolore id mollit",
          "type": "text"
        },
        {
          "key": "purchasing_time_frame",
          "value": "Within a month",
          "type": "text"
        },
        {
          "key": "role_in_purchase_process",
          "value": "",
          "type": "text"
        },
        {
          "key": "no_of_employees",
          "value": "5,001-10,000",
          "type": "text"
        },
        {
          "key": "comments",
          "value": "est veniam nostrud ut",
          "type": "text"
        },
        {
          "key": "custom_questions",
          "value": "[{\"title\":\"Ut ut\",\"value\":\"dolore mollit\"},{\"title\":\"do officia ex pariatur\",\"value\":\"proident\"}]",
          "type": "text"
        }
      ]
    },
    "url": {
      "raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "meetings",
        ":meetingId",
        "recordings",
        "registrants"
      ],
      "variable": [
        {
          "key": "meetingId",
          "value": "68423085",
          "description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
        }
      ]
    },
    "description": "Cloud Recordings of past Zoom Meetings can be made [on-demand](https://support.zoom.us/hc/en-us/articles/360000488283-On-demand-Recordings). Users should be [registered](https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/meetingrecordingregistrantcreate) to view these recordings.\n\nUse this API to register a user to gain access to **On-demand Cloud Recordings** of a past meeting.<br>\n**Scopes:** `recording:write:admin`, `recording:write`.<br>\n \n **[Rate Limit Label](https://marketplace.zoom.us/docs/api-reference/rate-limits#rate-limits):** `Light`\n\n"
  },
  "response": [
    {
      "name": "**HTTP Status Code:** `201` <br>\nRegistration submitted.",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "email",
              "value": "3uEtro@SmjrkWvqtnwJtizhCgFKllyfwdy.xuf",
              "type": "text"
            },
            {
              "key": "first_name",
              "value": "nulla cillum",
              "type": "text"
            },
            {
              "key": "status",
              "value": "pending",
              "type": "text"
            },
            {
              "key": "last_name",
              "value": "et minim",
              "type": "text"
            },
            {
              "key": "address",
              "value": "do esse",
              "type": "text"
            },
            {
              "key": "city",
              "value": "occaecat eiusmod cillum cupidatat",
              "type": "text"
            },
            {
              "key": "country",
              "value": "nisi magna reprehenderit dolor cillum",
              "type": "text"
            },
            {
              "key": "zip",
              "value": "nisi",
              "type": "text"
            },
            {
              "key": "state",
              "value": "amet ullamco proident Excepteur",
              "type": "text"
            },
            {
              "key": "phone",
              "value": "sit",
              "type": "text"
            },
            {
              "key": "industry",
              "value": "sit id Ut",
              "type": "text"
            },
            {
              "key": "org",
              "value": "nisi",
              "type": "text"
            },
            {
              "key": "job_title",
              "value": "enim dolor occaecat in",
              "type": "text"
            },
            {
              "key": "purchasing_time_frame",
              "value": "Within a month",
              "type": "text"
            },
            {
              "key": "role_in_purchase_process",
              "value": "Evaluator/Recommender",
              "type": "text"
            },
            {
              "key": "no_of_employees",
              "value": "5,001-10,000",
              "type": "text"
            },
            {
              "key": "comments",
              "value": "nostrud ",
              "type": "text"
            },
            {
              "key": "custom_questions",
              "value": "[{\"title\":\"eu in veniam\",\"value\":\"qui laborum\"},{\"title\":\"in qui irure\",\"value\":\"qui nostr\"}]",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "meetings",
            ":meetingId",
            "recordings",
            "registrants"
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "68423085",
              "description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
            }
          ]
        }
      },
      "status": "Created",
      "code": 201,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n \"registrant_id\": \"veniamKIW1Sonseq\",\n \"id\": 12345666,\n \"topic\": \"cupidatat dolore quis minim aliquip\",\n \"share_url\": \"https://zoom.us/recording/share/IpAAABBBBBBA1aqqkzFFgiJ2jpR\"\n}"
    },
    {
      "name": "**HTTP Status Code:** `404` <br>\nMeeting recording not found",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "Added as a part of security scheme: oauth2",
            "key": "Authorization",
            "value": "<token>"
          }
        ],
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "email",
              "value": "3uEtro@SmjrkWvqtnwJtizhCgFKllyfwdy.xuf",
              "type": "text"
            },
            {
              "key": "first_name",
              "value": "nulla cillum",
              "type": "text"
            },
            {
              "key": "status",
              "value": "pending",
              "type": "text"
            },
            {
              "key": "last_name",
              "value": "et minim",
              "type": "text"
            },
            {
              "key": "address",
              "value": "do esse",
              "type": "text"
            },
            {
              "key": "city",
              "value": "occaecat eiusmod cillum cupidatat",
              "type": "text"
            },
            {
              "key": "country",
              "value": "nisi magna reprehenderit dolor cillum",
              "type": "text"
            },
            {
              "key": "zip",
              "value": "nisi",
              "type": "text"
            },
            {
              "key": "state",
              "value": "amet ullamco proident Excepteur",
              "type": "text"
            },
            {
              "key": "phone",
              "value": "sit",
              "type": "text"
            },
            {
              "key": "industry",
              "value": "sit id Ut",
              "type": "text"
            },
            {
              "key": "org",
              "value": "nisi",
              "type": "text"
            },
            {
              "key": "job_title",
              "value": "enim dolor occaecat in",
              "type": "text"
            },
            {
              "key": "purchasing_time_frame",
              "value": "Within a month",
              "type": "text"
            },
            {
              "key": "role_in_purchase_process",
              "value": "Evaluator/Recommender",
              "type": "text"
            },
            {
              "key": "no_of_employees",
              "value": "5,001-10,000",
              "type": "text"
            },
            {
              "key": "comments",
              "value": "nostrud ",
              "type": "text"
            },
            {
              "key": "custom_questions",
              "value": "[{\"title\":\"eu in veniam\",\"value\":\"qui laborum\"},{\"title\":\"in qui irure\",\"value\":\"qui nostr\"}]",
              "type": "text"
            }
          ]
        },
        "url": {
          "raw": "{{baseUrl}}/meetings/:meetingId/recordings/registrants",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "meetings",
            ":meetingId",
            "recordings",
            "registrants"
          ],
          "variable": [
            {
              "key": "meetingId",
              "value": "68423085",
              "description": "(Required) The meeting's ID. \n\n When storing this value in your database, you must store it as a **long** format integer and **not** an integer. Meeting IDs can exceed 10 digits."
            }
          ]
        }
      },
      "status": "Not Found",
      "code": 404,
      "_postman_previewlanguage": "text",
      "header": [
        {
          "key": "Content-Type",
          "value": "text/plain"
        }
      ],
      "cookie": [
      ],
      "body": ""
    }
  ]
}