YouTube Data API - How to get “Saved playlists” via API

纵饮孤独 提交于 2019-12-14 01:06:47

问题


I'm trying to get all of my playlists through YouTube Data API including the public playlist that I have created and playlists that I liked from YouTube. The playlists that I have liked from YouTube are in separate section which call "Saved playlists". I'm using

https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId={ChannelID}&maxResults=50&key={YOUR_API_KEY}

But I'm getting only the playlist that I have created. How can I get the "Saved playlists"?


回答1:


I cannot add a comment, so I'm writing as an answer. (I hope I'm not doing anything against Stackoverflow Terms of Service)

If you would like to retrieve a spesific Playlist, i.e. "Saved Playlist", you should remove the Channel ID from your request and add Playlist ID ...

For example;

GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&id={PlaylistID}&maxResults=50&key={YOUR_API_KEY}

I hope it helps.




回答2:


Unfortunately this endpoint only retrieves user created playlists, the ability to retrieve "Saved Playlists" it is not implemented yet.

As can be seen here: https://code.google.com/p/gdata-issues/issues/detail?id=6836



来源:https://stackoverflow.com/questions/34119223/youtube-data-api-how-to-get-saved-playlists-via-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!