Youtube api 如何通过不使用OAuth的YouTube API知道播放列表是否私有
我遇到播放列表状态问题。我想做的是在没有OAuth的情况下获得播放列表状态。但是,它只有在与OAuth一起使用时才被检索 当我使用API_键发送关于带有playlists.list的私人播放列表的请求时,它会响应:Youtube api 如何通过不使用OAuth的YouTube API知道播放列表是否私有,youtube-api,Youtube Api,我遇到播放列表状态问题。我想做的是在没有OAuth的情况下获得播放列表状态。但是,它只有在与OAuth一起使用时才被检索 当我使用API_键发送关于带有playlists.list的私人播放列表的请求时,它会响应: GET https://www.googleapis.com/youtube/v3/playlists?part=id%2Csnippet%2Cstatus&id={PRIVATE_PLAYLIST_ID}&key={API_KEY} { "kind": "you
GET https://www.googleapis.com/youtube/v3/playlists?part=id%2Csnippet%2Cstatus&id={PRIVATE_PLAYLIST_ID}&key={API_KEY}
{
"kind": "youtube#playlistListResponse",
"etag": "\"q5k97EMVGxODeKcDgp8gnMu79wM/zJL80hJ0IwMo5wddECFapC8I6Q4\"",
"pageInfo": {
"totalResults": 0,
"resultsPerPage": 5
},
"items": [
]
}
这并没有给我任何线索播放列表是私人的或其他状态。如果我通过YouTube API找到答案,我应该怎么做?使用而不是playlist.list
它会提供一些间接的信息。尽管它不能确保播放列表是完全私有的,但我认为它很有用,以防万一
GET https://www.googleapis.com/youtube/v3/playlistItems?part=status&playlistId={PRIVATE_PLAYLIST_ID}&key={API_KEY}
{
"error": {
"errors": [
{
"domain": "youtube.playlistItem",
"reason": "playlistItemsNotAccessible",
"message": "The request is not properly authorized to retrieve the specified playlist.",
"locationType": "parameter",
"location": "playlistId"
}
],
"code": 403,
"message": "The request is not properly authorized to retrieve the specified playlist."
}
}
使用而不是playlist.list
它会提供一些间接的信息。尽管它不能确保播放列表是完全私有的,但我认为它很有用,以防万一
GET https://www.googleapis.com/youtube/v3/playlistItems?part=status&playlistId={PRIVATE_PLAYLIST_ID}&key={API_KEY}
{
"error": {
"errors": [
{
"domain": "youtube.playlistItem",
"reason": "playlistItemsNotAccessible",
"message": "The request is not properly authorized to retrieve the specified playlist.",
"locationType": "parameter",
"location": "playlistId"
}
],
"code": 403,
"message": "The request is not properly authorized to retrieve the specified playlist."
}
}