2017-10-15 9 views
0

내가 방법을 다음과 같이 재생 목록의 항목을 삭제하는 것을 시도했다 :삭제 재생 목록 항목

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); 
} 

하고 모두 playlistItemsNotAccessible 말을하는거야/금지 :

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:118\nStack 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 탐색기를 사용하는이 두 메소드는 권한이 없으므로 권한이 부여 된 모든 범위에서 사용합니다.

모든 도움을 주시면 감사하겠습니다.

+0

(https://developers.google.com/youtube/v3/docs/playlistItems/delete# .. 난 그냥 바보 잘못된 채널을 허가했다 밝혀 오류), 'playlistItemsNotAccessible' 오류는 요청에 지정된 재생 목록 항목을 삭제할 권한이 적절하지 않다는 의미입니다. 아직하지 않았다면이 [page] (https://developers.google.com/youtube/v3/guides/authentication)에서 OAuth 2.0 개념에 대해 자세히 알아보세요. – Teyam

답변