Update a meeting registrant’s status

Description
I send a request to update the registrant status, but I get an error of 300

Error
The full error message or issue you are running into.

Which App Type (OAuth / Chatbot / JWT / Webhook)?
OAuth

Which Endpoint/s?
Khttps://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingregistrantstatus

How To Reproduce (If applicable)

function put_registrants_status($meetingId,$mail, $id){

$body=array(
    "action"=> "approve",
    "registrants"=> array(
        array(
            "email"=>$mail,
            "id"=> $id
        )
    )
);
$url="https://api.zoom.us/v2/meetings/".$meetingId."/registrants/status";
$arParam=get_zoom_param();
$headrs = array();
$headrs[] = 'Content-type: application/json';
$headrs[] = 'Authorization: Bearer '.$arParam["ACCESS_TOKEN"];

$crl = curl_init($url);
curl_setopt($crl, CURLOPT_HTTPHEADER,$headrs);
curl_setopt($crl, CURLOPT_POSTFIELDS, json_encode($body));
curl_setopt($crl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($crl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($crl, CURLOPT_PUT,true);
$rest = curl_exec($crl);
$rest=json_decode($rest,true);
return $rest;

}

Hey @yonksdsp,

Please share the full error message from Zoom, and the request body JSON you are sending.

Thanks,
Tommy

Hey.

body JSON:
{“action”:“approve”,“registrants”:[{“email":"leonov_andrew@mail.ru”,“id”:“HAqU9JOmTga5FLGdneCluw”}]}

error:

(
[code] => 300
[message] => Request Body should be a valid JSON object.
)

Hey,

This maybe a formatting issue. You are using the the Unicode quotes (which have separate left adn right
quotes), when you should be using the ASCII quotation marks (a single quotation mark).

(Just a suggestion, because I had a similar problem with the apostrophe sign)

1 Like

Thanks for your suggestions @pritam! :slight_smile:

@yonksdsp, does the following work for you?

{
  "action": "approve",
  "registrants": [{
    "email": "leonov_andrew @mail.ru",
    "id": "HAqU9JOmTga5FLGdneCluw"
  }]
}

Thanks,
Tommy

No, it didn’t help([quote=“tommy, post:5, topic:26303, full:true”]
Thanks for your suggestions @pritam! :slight_smile:

@yonksdsp, does the following work for you?

{
  "action": "approve",
  "registrants": [{
    "email": "leonov_andrew @mail.ru",
    "id": "HAqU9JOmTga5FLGdneCluw"
  }]
}

Thanks,
Tommy
[/quote]

No, it didn’t help(

Hey @yonksdsp,

Apologies, can you try this:

{
  "action": "approve",
  "registrants": [{
    "email": "leonov_andrew@mail.ru",
    "id": "HAqU9JOmTga5FLGdneCluw"
  }]
}

Thanks,
Tommy

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