Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nicola Spurdens 4 posts 74 karma points
    Mar 11, 2020 @ 17:00
    Nicola Spurdens
    0

    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.

    1. Did the app hardcoded in the code "YouTubeHelper.cs" possibly get disabled or hit a quota limit? https://console.developers.google.com/apis/api/youtube.googleapis.com/overview?project=103677695896

    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] "

    1. 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:

    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

  • Barry Fogarty 493 posts 1129 karma points
    May 07, 2020 @ 15:44
    Barry Fogarty
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft