结束录制报错432

<?php
$getToken=file_get_contents('php://input'); 
$Authorization=json_decode($getToken,true);
$resourceid=$Authorization["resourceid"];
$cname=$Authorization["cname"];
$uid=$Authorization["uid"];
$sid=$Authorization["sid"];
$url = "https://api.agora.io/v1/apps/78846e9910a846688ab959e0f87034e5/cloud_recording/resourceid/$resourceid/sid/$sid/mode/mix/stop"; 
$arr_header[] = "Content-Type:application/json"; 
$arr_header[] = "Authorization: Basic ".base64_encode("35f77d79faca462db9722208e839a60a:e510c9f9135c4e299e7eff9fd2d0b6f2"); //http basic auth 
$data = array('cname'=>"$cname",'uid'=>"$uid",'clientRequest'=>json_decode("{}"));
$data_json = json_encode($data);
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url ); //request url
curl_setopt($ch, CURLOPT_POST, 1); //post提交方式
curl_setopt($ch, CURLOPT_POSTFIELDS,$data_json); 
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);// 跳过检查
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);// 跳过检查
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //print
if(!empty($arr_header)){ 
curl_setopt($ch, CURLOPT_HTTPHEADER, $arr_header); 
} 
$response = curl_exec($ch); 
curl_close($ch);
echo $response; 
?>

为了让你的提问尽快获得解答,请选择正确的提问分区,已经帮你移动了。另外,发帖编辑器支持markdown,可以稍加编辑让你的代码更易读。已经帮你编辑了。


参考这篇帖子,里面有默认参数。