1
仅使用视频ID和密钥,是否可以使用API V3删除YouTube视频?我不断收到关于缺少“必需参数:部分”的错误。我与服务器和浏览器API密钥试过这里是我的代码:使用PHP,视频ID和API密钥删除YouTube视频
// $youtube_id = the ID string and $key = the Key for browser applications
$delete_string = "https://www.googleapis.com/youtube/v3/videos?id=" . $youtube_id ."&key=" . $key;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$delete_string);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch,CURLOPT_HEADER, true);
$output=curl_exec($ch);
curl_close($ch)
我得到的错误:
{ "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Required parameter: part", "locationType": "parameter", "location": "part" } ], "code": 400, "message": "Required parameter: part" } }