我尝试使用以下方法删除播放列表项目:
function deleteVideoFromPlaylist($vid, $youtube) {
$youtube->playlistItems->delete($vid);
}
function playlistItemsDelete($youtube, $id, $params) {
$params = array_filter($params);
$response = $youtube->playlistItems->delete(
$id,
$params
);
print_r($response);
}
他们都在说播放列表项目不可访问/禁止:
Uncaught exception 'Google_Service_Exception' with message
'{n "error": {n "errors": [n {n "domain":
"youtube.playlistItem",n "reason": "playlistItemsNotAccessible",n
"message": "Forbidden",n "locationType": "parameter",n
"location": "id"n }n ],n "code": 403,n "message":
"Forbidden"n }n}n' in /var/www/html/nextcloud_yt_integration/google-
api-php-client-2.2.0/src/Google/Http/REST.php:118nStack trace:n#0 /var/www/html/nextcloud_yt_integration/google-api-php-client-2.2.0/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), NULL)n#1 [internal function]: Google_Http_REST::doExecute(Object(GuzzleHttp\Client), Object(GuzzleHttp\Psr7\Request), NULL)n#2 /var/www/html/nextcloud_yt_integration/google-api-php-client-2.2.0/src/Google/Task/Runner.php(176): call_user_func_array(Array, Array)n#3 /var/www/html/nextcloud_yt_integration/google-api-php-client-2.2.0/src/Google/Http/REST.php(58): Google_Task_Runner->run()n#4 /va in /var/www
/html/nextcloud_yt_integration/google-api-php-client-2.2.0/src/Google
/Http/REST.php on line 118
除了这两种方法之外,API 资源管理器还说我没有权限这样做 - 所有范围都已获得授权
任何帮助将不胜感激。
原来
我只是一个白痴,授权了错误的频道。