# WordPress: The parameter is required in custom\_questions in zoom

**URL:** <https://devforum.zoom.us/t/wordpress-the-parameter-is-required-in-custom-questions-in-zoom/64357>\
**Category:** API and Webhooks\
**Created:** [February 15, 2022, 6:16pm UTC](https://devforum.zoom.us/t/wordpress-the-parameter-is-required-in-custom-questions-in-zoom/64357 "2022-02-15T18:16:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dastageerkhan733](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dastageerkhan733/32/18306_2.png) [@dastageerkhan733](https://devforum.zoom.us/u/dastageerkhan733)\
**Post date:** [February 15, 2022, 6:16pm UTC](https://devforum.zoom.us/t/wordpress-the-parameter-is-required-in-custom-questions-in-zoom/64357/1 "2022-02-15T18:16:09Z")

</div>

before 3 days ago the code work good and auto registration is work, but today the auto registration not work and show me this error message

> The parameter is required in custom\_questions: I declare that I am responsible to write down my name the way [I](https://www.olansise.com/) want it to appear on the Certificate of Attendance and no changes will be done after certificate issuance.

why !!

this is my code and add parameter and not work

```auto
function call_zoom_api($args){
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://api.zoom.us/v2/' . $args['zoom_type'] . '/' . $args['zoom_meeting_id'] . '/registrants',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => $args['type'],
        CURLOPT_POSTFIELDS => $args['data'],
        CURLOPT_HTTPHEADER => array(
            'authorization: Bearer ' . $args['api_key'],
            'Content-Type: application/json'
        ),
    ));
    $response = curl_exec($curl);
    curl_close($curl);
    return json_decode($response, true);
}

function store_zoom($user,$data){
    $responses = array();

    $zoom_options = get_option("zoom-option");
    foreach ($data["meetingIdSenda"] as $key => $zoom_meeting_id) {
        $zoom_type = $data["meetingIdType"][$key];
        $res = call_zoom_api([
            'zoom_type' => $zoom_type,
            'zoom_meeting_id' => $zoom_meeting_id,
            'type' => 'POST',
            'data' => '{
              "email": "' . $user->user_email . '",
              "first_name": "' . $data["fnameSenda"] . '",
              "last_name": "' . $data["lnameSenda"] . '",
              "phone": "' . $data["phoneSenda"] . '",
              "city": "string",
              "country": "AE",
              "custom_questions": [
                {
                    "title": "string",
                    "value": "string"
                }
            ],
              "address": "' . $data["saudiID"] . '"
            }',
            'api_key' => $zoom_options['api-token'],
        ]);

        if(!empty($res['join_url'])){
            wc_add_order_item_meta($data["itemId"][$key], '_zoom_registered',$res['registrant_id'],true);

            $responses[] = [
                'code' => 200,
                'res'=> $res,
                'message' => "Success Registration - for ". $zoom_type ." <a href='" . $res['join_url'] . "'>Meeting link</a>"
            ];
        }else {

            $responses['error'] = true;
            $responses[] = [
                'code' => 300,
                'res' => $res,
                'message' => $res['message']
            ];
        }

    }
    return $responses;

}

function get_zoom_data($order_item_id){

    $zoom_type = get_post_meta($order_item_id, 'zoom-type', true);
    $zoom_meeting_id = get_post_meta($order_item_id, 'zoom-meeting-id', true);
    if (!empty($zoom_meeting_id) && !empty($zoom_type)) {
        return [
            'zoom_types' => $zoom_type,
            'zoom_meeting_ids' => $zoom_meeting_id,
        ];
    }
    return false;
}
function update_zoom($order){

    $responses = array();
    $single_meet = array();
    foreach ($order->get_items() as $item) {
        $is_registered = !empty(wc_get_order_item_meta($item->get_id(), '_zoom_registered', true));
        if ($is_registered) {
            continue;
        }

        $order_item_id = wc_get_order_item_meta($item->get_id(), '_course_id');
        if ($order_item_id || $order_item_id == 0) {
            $order_item_id = $item->get_product_id();
        }

        $zoom_data = get_zoom_data($order_item_id);

        if($zoom_data){
            $single_meet[] = [
                'zoom_meeting_ids' => $zoom_data['zoom_meeting_ids'],
                'zoom_types' => $zoom_data['zoom_types'],
                'itemId' => $item->get_id(),
            ];
        }
    }

    if (!empty($single_meet) || $single_meet != null) {
        $responses[] = [
            'code' => 200,
            'res'=> $single_meet,
            'message' => "One step to be done"
        ];
    }

    return $responses;

}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [March 18, 2022, 4:16am UTC](https://devforum.zoom.us/t/wordpress-the-parameter-is-required-in-custom-questions-in-zoom/64357/2 "2022-03-18T04:16:58Z")

</div>

Closed on March 18, 2022, 4:16am UTC

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