Reputation: 13
Whenever I try to get an earnings related metric in the API, it returns "Insufficient permission to access this report". But when I remove it and replace with simple metrics like "views" or "likes", it works.
Here's the request:
Upvotes: 1
Views: 1388
Reputation: 3700
JavaScript
var OAUTH2_SCOPES = [
'https://www.googleapis.com/auth/youtube',
'https://www.googleapis.com/auth/youtube.force-ssl'
];
to retrieve comments from the YouTube API add https://www.googleapis.com/auth/youtube.force-ssl this into OAUTH2_SCOPES array
Upvotes: 1
Reputation: 7741
Well, I try it my self and like you, I also got the 401 error when I use the metrics estimatedRevenue.
I found here in this SO question that it's only possible to retrieve monetary information in YouTube Analytics API reports when those reports are run via the context of a content owner, as described in the documentation.
This linked issue might also help you.
Upvotes: 1