I am not able to get any response from youtube analytics v1 API suddenly. It was working fine before.
Code -
string dimension = "country";
string requestedMetrics = "views,redViews,comments,likes,dislikes,videosAddedToPlaylists," +
"videosRemovedFromPlaylists,shares,estimatedMinutesWatched,estimatedRedMinutesWatched," +
"averageViewDuration,averageViewPercentage,cardClickRate,cardTeaserClickRate,cardImpressions," +
"cardTeaserImpressions,cardClicks,cardTeaserClicks,subscribersGained,subscribersLost";
ReportsResource.QueryRequest result = this.analyticsService.Reports
.Query("channel==MINE", this.reportDate.ToString("yyyy-MM-dd"), this.reportDate.ToString("yyyy-MM-dd"), requestedMetrics);
result.Dimensions = dimension;
if (!string.IsNullOrEmpty(videoId) && videoId.ToLower() != "all")
{
result.Filters = $"video=={videoId}";
}
Google.Apis.YouTubeAnalytics.v1.Data.ResultTable resultTable = result.Execute();
The scopes getting used -
string[] scopes = new string[] { YouTubeAnalyticsService.Scope.YtAnalyticsMonetaryReadonly, "https://www.googleapis.com/auth/youtube.readonly", "https://www.googleapis.com/auth/yt-analytics-monetary.readonly" };
I have seen youtube analytics v1 API will get deprecated on october 31st 2018. But till migration to v2 I need to fix the issue.