2014-12-05 75 views
0

我需要得到的收入明細的用戶從YouTube的YouTube Analytics(分析)

我跟着以下網址獲得收益

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." 
} 
} 

我的問題是:

  1. 我的查詢是否正確?
  2. 如何在YouTube API中獲得收入?
  3. contentOwner==OWNER_NAME如何獲取YouTube CMS的OWNER_NAME?
  4. 什麼是YouTube CMS? 請幫我

回答

0

直接從您發佈的鏈接:Sample API Requests

您也必須驗證爲指定的頻道或內容 所有者,這樣的API瀏覽器可以使用 授權API請求OAuth 2.0。

對您的第一個問題的回答是:沒有您的要求是不正確的。在訪問數據之前,您需要進行身份驗證。 Implementing OAuth 2.0 Authorization

另外:YouTube內容管理器(CMS

相關問題