【发布时间】:2023-03-26 02:46:01
【问题描述】:
我想订阅一个特定的频道,为此我使用他们的official docs。在首页右侧有一个执行按钮:
这应该是为了演示请求,在我授予访问权限后它会引发错误:
/**
* API response
*/
{
"error": {
"errors": [
{
"domain": "youtube.subscription",
"reason": "publisherRequired",
"message": "The subscription resource specified in the request must use the snippet.resourceId property to identify the channel that is being subscribed to."
}
],
"code": 400,
"message": "The subscription resource specified in the request must use the snippet.resourceId property to identify the channel that is being subscribed to."
}
}
但请求正文包含snippet.resourceId:
{"0":{"name":"snippet.resourceId.kind","value":"youtube#channel"},"1":{"name":"snippet.resourceId.channelId","value":"UC_x5XG1OV2P6uZZ5FSM9Ttw"}}
【问题讨论】:
标签: youtube youtube-api youtube-data-api