google-code-export / google-apis-explorer

Automatically exported from code.google.com/p/google-apis-explorer
Apache License 2.0
1 stars 3 forks source link

Cannot get earnings of a Youtube Channel via API #98

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Authorize boths scopes: yt-analytics-monetary.readonly, ytnalytics.readonly

2.Try to get earnings metrics

What is the expected output? What do you see instead?

I should see the earnings of my channel

What version of the product are you using? On what operating system?
Ubuntu Linux, Chrome 22, 

Please provide any additional information below.

I'm a Youtube partner.
I got channel Id from here...
http://www.youtube.com/account_advanced

This is the request:
GET 
https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel={MY_CHANNEL}
-date=2013-03-01&end-date=2013-03-31&metrics=earnings&dimensions=day&sort=day&ke
y={YOUR_API_KEY}

Authorization:  Bearer ya29.AHES6ZQgPnFrICPgfoHvbB_hUCyUFZtaMCaWlEp2PFc1RIy4
X-JavaScript-User-Agent:  Google APIs Explorer

The whole response:
401 Unauthorized

- Hide headers -
cache-control:  private, max-age=0
content-encoding:  gzip
content-length:  153
content-type:  application/json; charset=UTF-8
date:  Sun, 28 Jul 2013 13:56:25 GMT
expires:  Sun, 28 Jul 2013 13:56:25 GMT
server:  GSE
www-authenticate:  Bearer 
realm="https://www.google.com/accounts/AuthSubRequest", error=invalid_token
{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "unauthorized",
    "message": "Insufficient permission to access this report."
   }
  ],
  "code": 401,
  "message": "Insufficient permission to access this report."
 }
}

Original issue reported on code.google.com by alexbenf...@gmail.com on 28 Jul 2013 at 2:02

GoogleCodeExporter commented 9 years ago
I have the exact same problem. Any resolution?

Original comment by phil.sta...@gmail.com on 7 Sep 2013 at 6:09

GoogleCodeExporter commented 9 years ago
Hi...
No resolution yet, as far as I know...
I'm waiting for an answer here:
http://code.google.com/p/gdata-issues/issues/detail?id=4826

Original comment by alexbenf...@gmail.com on 7 Sep 2013 at 8:40