I am using v3 of the Youtube API and am trying to get a list of my channel's playlists.
It's working, however it only returns playlists that have a status.privacyStatus
of public
.
How can I retrieve playlists that are unlisted
?
This is the call I am using.
public function getPlaylists($channelId)
{
$this->_quotaConsumed += 3;
return $this->getService()
->playlists
->listPlaylists('id,snippet,status', array(
'channelId' => $channelId,
'maxResults' => 50,
));
}
I am using an OAuth Service Account.
The YouTube API V3 does not support OAuth service accounts, so your call is just retrieving public access data. To retrieve things such as private or unlisted data, you'll have to set up the regular OAuth flow, authenticate yourself with the traditional token exchange, and then do the call with the "mine" parameter set to true.