我需要从YouTube获取用户的收入详细信息
我按照以下网址获取收入
https://developers.google.com/youtube/analytics/sample-requests#Content_Owner_Reports
我通过了如下请求
GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3D*******************&start-date=2014-05-01&end-date=2014-06-30&metrics=earnings&key={YOUR_API_KEY}
但结果是
{
"error": {
"errors": [
{
"domain": "global",
"reason": "unauthorized",
"message": "Insufficient permission to access this report."
}
],
"code": 401,
"message": "Insufficient permission to access this report."
}
}
我的问题是:
contentOwner==OWNER_NAME
如何为YouTube CMS获取OWNER_NAME? 请帮我
最佳答案
直接从您发布的链接:Sample API Requests
You also have to be authenticated as the specified channel or content owner so that the APIs Explorer can authorize your API requests using OAuth 2.0.
您第一个问题的答案是:没有您的请求不正确。您需要先经过身份验证,然后才能访问数据。 Implementing OAuth 2.0 Authorization
另外:YouTube内容管理器(CMS)
关于python - YouTube分析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27309926/