yonksdsp
(Чистые)
August 5, 2020, 11:52am
1
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;
}
tommy
(Tommy Gaessler)
August 6, 2020, 9:11pm
2
Hey @yonksdsp ,
Please share the full error message from Zoom, and the request body JSON you are sending.
Thanks,
Tommy
yonksdsp
(Чистые)
August 7, 2020, 7:55am
3
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.
)
pritam
(Pritam)
August 7, 2020, 8:03am
4
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
tommy
(Tommy Gaessler)
August 10, 2020, 6:59am
5
Thanks for your suggestions @pritam !
@yonksdsp , does the following work for you?
{
"action": "approve",
"registrants": [{
"email": "leonov_andrew @mail.ru",
"id": "HAqU9JOmTga5FLGdneCluw"
}]
}
Thanks,
Tommy
yonksdsp
(Чистые)
August 12, 2020, 9:18am
6
No, it didn’t help([quote=“tommy, post:5, topic:26303, full:true”]
Thanks for your suggestions @pritam !
@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(
tommy
(Tommy Gaessler)
August 12, 2020, 8:30pm
7
Hey @yonksdsp ,
Apologies, can you try this:
{
"action": "approve",
"registrants": [{
"email": "leonov_andrew@mail.ru",
"id": "HAqU9JOmTga5FLGdneCluw"
}]
}
Thanks,
Tommy
system
(system)
Closed
August 22, 2020, 8:30pm
8
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.