云端开始录制的时候,code为432

<?php
$getToken=file_get_contents('php://input'); 
$Authorization=json_decode($getToken,true);
$resourceid=$Authorization["resourceid"];
$cname=$Authorization["cname"];
$uid=$Authorization["uid"];
$url = "https://api.agora.io/v1/apps/78846e9910a846688ab959e0f87034e5/cloud_recording/resourceid/$resourceid/mode/mix/start"; 
$arr_header[] = "Content-Type:application/json"; 
$arr_header[] = "Authorization: Basic ".base64_encode("35f77d79faca462db9722208e839a60a:e510c9f9135c4e299e7eff9fd2d0b6f2"); //http basic auth 
$data = array('cname'=>"hello123",'uid'=>"123456",'clientRequest'=>json_decode('{"storageConfig":{"bucket":"ty-shuangshi-records","secretKey":"保密","region":6,"accessKey":"保密","vendor":2},"recordingConfig":{"channelType":0,"maxIdleTime":10,"transcodingConfig":{"width":1920,"fps":36,"bitrate":3000,"height":1080},"audioProfile":0}}'));
$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; 
?>

432 :请求参数错误。请求参数不合法,或请求中的 App ID,频道名或用户 ID 与 resource ID 不匹配。

{“width”:1920,“fps”:36,“bitrate”:3000,“height”:1080}
这里填的不合适,请参照表格来填写:
https://docs.agora.io/cn/faq/recording_video_profile

<?php
$getToken=file_get_contents('php://input'); 
$Authorization=json_decode($getToken,true);
$resourceid=$Authorization["resourceid"];
$cname=$Authorization["cname"];
$uid=$Authorization["uid"];
$url = "https://api.agora.io/v1/apps/78846e9910a846688ab959e0f87034e5/cloud_recording/resourceid/$resourceid/mode/mix/start"; 
$arr_header[] = "Content-Type:application/json"; 
$arr_header[] = "Authorization: Basic ".base64_encode("35f77d79faca462db9722208e839a60a:e510c9f9135c4e299e7eff9fd2d0b6f2"); //http basic auth 
$data = array('cname'=>"hello123",'uid'=>"123456",'clientRequest'=>json_decode('{"storageConfig":{"bucket":"ty-shuangshi-records","secretKey":"保密","region":6,"accessKey":"保密","vendor":2},"recordingConfig":{"channelType":0,"maxIdleTime":10,"transcodingConfig":{"width":640,"fps":15,"bitrate":400,"height":360},"audioProfile":0}}'));
$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;

我这边改了,回复还是一样的432

能发一个clientRequest这个的默认配置吗


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