DrXCheng
DrXCheng

Reputation: 4132

Get list of videos including private/unlisted using contentOwnerId

I was using playlistitems to get the authenticated users' video list (including private/unlisted).

Now I tried contentOwnerId. I can get private video info using onBehalfOfContentOwner, but there is no onBehalfOfContentOwner key for playlistitems.

Is there other way to get the full list of an owned channel?

Upvotes: 0

Views: 3413

Answers (1)

Jeff Posnick
Jeff Posnick

Reputation: 56144

I'm fairly certain that the expected way of doing this is via search.list(part=snippet, forContentOwner=true, onBehalfOfContentOwner=CONTENT_OWNER_ID, type=video, maxResults=50) and optionally including channelId=UC... if you just want to get the videos in a specific channel you manage. You'd have to request multiple pages if there are more than 50 videos. I just tested that out and it does appear to return private as well as public videos.

Yes, it's kind of odd that this is done via search.list() and not playlistItems.list()...

Upvotes: 1

Related Questions