Youtube.analytics.query api给出了禁止的错误 [英] Youtube.analytics.query api giving forbidden error
问题描述
我想获取基本上不归我所有的youtube频道的分析数据.我正在使用此API. 如果这不是正确的API,请建议我如何实现. 另外,我正在使用节点. https://youtubeanalytics.googleapis.com/v2/reports?dimensions=day&endDate=2019-01-01&ids=channel%3D%3DUCZSNzBgFub_WWil6TOTYwAg&metrics=likes&startDate=2018- 01-01
I want to fetch the analytics of any channel of youtube that basically are not owned by me. I am using this API. If this is not the right API please suggest me how to achieve this. Also, I am using node. https://youtubeanalytics.googleapis.com/v2/reports?dimensions=day&endDate=2019-01-01&ids=channel%3D%3DUCZSNzBgFub_WWil6TOTYwAg&metrics=likes&startDate=2018-01-01
响应:
{
"error": {
"code": 403,
"message": "Forbidden",
"errors": [
{
"message": "Forbidden",
"domain": "global",
"reason": "forbidden"
}
]
}
}
推荐答案
您需要了解私有数据和公共数据之间的区别.公开数据是任何人都可以访问的数据.例如YouTube上的公开视频
You need to understand the difference between private and public data. Public data is data that can be accessed by anyone. Public videos on YouTube for example
私人数据是用户拥有的数据.一个很好的例子就是对YouTube频道的分析.未经拥有它的用户许可,您无法访问此类信息.
Private data is data that is owned by a user. A good example of that would be the analytics for a channel on Youtube. You cant access this kind of information without the permission of the user who owns it.
{
"error": {
"code": 403,
"message": "Forbidden",
"errors": [
{
"message": "Forbidden",
"domain": "global",
"reason": "forbidden"
}
]
}
}
表示当前经过身份验证的用户无权执行您尝试执行的操作.您需要使用有权访问此数据的用户登录.我建议您请频道所有者为您提供访问权限.
Means that the currently authenticated user doesn't have permission to do what you are trying to do. You need to login with a user who has access to this data. I suggest you ask the owner of the channel to give you access.
这篇关于Youtube.analytics.query api给出了禁止的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!