I am using YouTube Analytics API with oauth2.0 authorization to get channel owner demographic(ageGroup and gender).
It does not return any values for the ageGroup and gender. The login(authentication) part works and GAPI loads perfectly as well, but, no values are returned (even though channel analytics show agegroup and gender).
Surprisingly, when I use the basic dimensions (views, likes, comments etc.), it returns the values properly.
Here is how the response look like:
This is the code:
function execute() { return gapi.client.youtubeAnalytics.reports.query({ "ids": "channel==MINE", "startDate": "2019-01-01", "endDate": "2022-03-27", "metrics": "viewerPercentage", "dimensions": "ageGroup,gender", "filters": "subscribedStatus==SUBSCRIBED", "sort": "ageGroup,gender" }) .then(function(response) { console.log("Response", response); }, function(err) { console.error("Execute error", err); }); }
