Trying to get this 2014 package to run under our client's own app key still fails:
2.1. Is it possible that I need to update & rebuild the source code as YouTubeHelper.cs is hardcoding the app name (_ApplicationName) meaning GetYouTubeService() may be failing authentication?
Line 14:
private const string _ApiKey = "";
private const string _ApplicationName = "YouTube for Umbraco";
/// <summary>
/// Gets the YouTube Service that we use for all requests
/// </summary>
/// <returns></returns>
public static YouTubeService GetYouTubeService()
{
var youTubeService = new YouTubeService(new BaseClientService.Initializer()
{
ApiKey = WebConfigurationManager.AppSettings["YouTube-Umbraco:ApiKey"] ?? _ApiKey,
ApplicationName = _ApplicationName
});
return youTubeService;
}
2.2 Things I've tried:
a. Configuring an app for our client:
Have you confirmed that the appsettings key is called YouTube-Umbraco:ApiKey in your web.config? The instructions on Our is wrong, as been noted in previous threads. The instructions on the GitHub readme should be used:
I take it you have already done this but it just caught me out. Otherwsise, it may just be you are out of quota - the app does make a lot of API requests, you could try making a custom build from the GitHub repo or using the MyGet feed as discussed here:
Google.Apis.Requests.RequestError Access Not Configured. YouTube Data API has not been used in project 103677695896
Advice please: Our client's youtube embed have stopped working after years of stability.
Looks like our code was never using it's own api key: Something must have changed on google's end or umbraco's end.
Error in our log files indicated "YouTube Data API v3" may need to be enabled or quota limit increased?
" Google.Apis.Requests.RequestError Access Not Configured. YouTube Data API has not been used in project 103677695896 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=103677695896 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. [403] "
Trying to get this 2014 package to run under our client's own app key still fails:
2.1. Is it possible that I need to update & rebuild the source code as YouTubeHelper.cs is hardcoding the app name (_ApplicationName) meaning GetYouTubeService() may be failing authentication? Line 14:
2.2 Things I've tried: a. Configuring an app for our client:
Enabled the "youtube api v3 api" & generated an app key for it which I've put into Staging. https://console.developers.google.com/apis/credentials?project=my-project-12345678your-own-id-here
b. Enabling domains for our live and staging sites: https://console.developers.google.com/apis/credentials/domainverification?project=my-project-12345678your-own-id-here
b. Adding two keys into our web.config file:
Ta, Nix
Have you confirmed that the appsettings key is called
YouTube-Umbraco:ApiKey
in your web.config? The instructions on Our is wrong, as been noted in previous threads. The instructions on the GitHub readme should be used:https://github.com/warrenbuckley/YouTube-Umbraco/
I take it you have already done this but it just caught me out. Otherwsise, it may just be you are out of quota - the app does make a lot of API requests, you could try making a custom build from the GitHub repo or using the MyGet feed as discussed here:
https://github.com/warrenbuckley/YouTube-Umbraco/pull/26
I just confirmed it was a quota issue for my client by setting up my own test key in the Google API developers console, info here:
https://developers.google.com/youtube/v3/getting-started
is working on a reply...