I have sent the following request to get the playlist ID of the IGN channel:
https://developers.google.com/youtube/v3/docs/channels/list?apix=true&apix_params=%7B%22part%22%3A%5B%22contentDetails%22%5D%2C%22forUsername%22%3A%22ign%22%7D#try-it
.
Then I extracted contentDetails.relatedPlaylists.uploads
, which is the main playlist ID of this channel.
Afterwards I used this playlist id in the following request to get corresponding videos:
https://developers.google.com/youtube/v3/docs/playlistItems/list?apix_params=%7B%22part%22%3A%5B%22contentDetails%22%2C%22snippet%22%2C%22id%22%2C%22status%22%5D%2C%22maxResults%22%3A50%2C%22playlistId%22%3A%22UU5YfR2K_rXeIy7bseOKky6Q%22%2C%22prettyPrint%22%3Atrue%7D#try-it
.
The problems are:
- Inconsistent response (sometimes
404
, sometimes200
) on same request; - When I get
200
, no videos were returned.
What I am doing wrong here?
playlistId
parameter cannot be found.","errors":[{"message":"The playlist identified with the request'splaylistId
parameter cannot be found.","domain":"youtube.playlistItem","reason":"playlistNotFound","location":"playlistId","locationType":"parameter"}]}}`. – stvar Dec 13 '20 at 23:58