Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Youtube API get unlisted videos

$
0
0

for a project i have to list all videos from a youtube user account.I'm getting all public videos, but when i make an api call after oauth i still get only public videos.

Unlisted videos are videos that are hidden from search engine and user public page.I'm sure there is a way to retrieve that.

Here is my code

var request = gapi.client.youtube.playlistItems.list({            playlistId: listId,            part: 'snippet,status',            maxResults: 25,            pageToken: nextPageToken        });        request.execute(function(response) {            console.log(response)            nextPageToken = response.nextPageToken            if ('error' in response) {                displayMessage(response.error.message);            } else {                if ('items' in response) {                    console.log(response.items)                    var a = [];                    for(var i in response.items){                        var d = {                            title: response.items[i].snippet.title,                            videoId: response.items[i].snippet.resourceId.videoId,                            publishedAt: response.items[i].snippet.publishedAt                        }                        a.push(d);                        $("#message").append(JSON.stringify(d))                    }                } else {                    displayMessage('There are no videos in your channel.');                }            }        });

Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>