2015-05-11 54 views
0

我正在使用v3 of the Youtube API並試圖獲取我頻道播放列表的列表。獲取包括未列出的YouTube播放列表的列表

它正在工作,但它只返回具有status.privacyStatuspublic的播放列表。

如何檢索unlisted的播放列表?

這是我正在使用的呼叫。

public function getPlaylists($channelId) 
{ 
    $this->_quotaConsumed += 3; 
    return $this->getService() 
     ->playlists 
     ->listPlaylists('id,snippet,status', array(
      'channelId' => $channelId, 
      'maxResults' => 50, 
     )); 
} 

我正在使用OAuth服務帳戶。

回答

0

YouTube API V3不支持OAuth服務帳戶,所以您的電話只是檢索公共訪問數據。要檢索諸如私人或不公開數據之類的內容,您必須設置常規OAuth流程,使用傳統令牌交換進行身份驗證,然後使用「mine」參數設置爲true進行呼叫。