Getting Error 403: Access Not Configured. Please use Google Developers Console to activate the API for your project

JavascriptYoutube ApiYoutube Javascript-Api

Javascript Problem Overview


I am trying to use the Youtube API to pull in all the videos from a particular channel. I set up the project in Google Developers Console and got an API browser key. I enabled YouTube Data API v3 and for safe measure, I enabled YouTube Analytics API.

I do not know what I am getting this error. Can anyone help me.

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
 }
}

Code i'm using. It doesn't do anything yet, just try to fetch the data.

jQuery.getJSON('https://www.googleapis.com/youtube/v3/channels?part=UncleBens&id=UncleBens&key=AIzaSyDXD80S1mFHH2HSZFxLemkae-_Cl_nY5Xk', function(data){
    console.log(data);
    for(var i=0; i<data.data.items.length; i++) {
       console.log(data.data.items[i].title); // title
       console.log(data.data.items[i].description); // description
    }
});

Javascript Solutions


Solution 1 - Javascript

You must enable a couple of API (in new google console) for things to work as expected.

Go to https://console.developers.google.com and make sure under "APIs" that you have following APIs enabled:

  1. "Contacts API"
  2. "Google+ API"

Solution 2 - Javascript

Try setting the "Referers" to "Any referer allowed" for your project (just leave the field empty) in the [Google Developers Console][1] if it is not already like that.

To do this, go to your [Google Developers Console][1] and open API & Auth / Credentials and click "Edit allowed referers" empty the input field.

[1]: http://console.developers.google.com "Google Developers Console"

Solution 3 - Javascript

I faced the same issue. While I am not sure of the reason and logic behind this, but the following steps worked -

  1. I left the referers field blank (Any referer allowed). However, this alone did not work.
  2. I regenerated the browser key. That did the trick.

Hope this helps.

Solution 4 - Javascript

I've faced the same problem just this morning, but I was just trying to login with a google account. I was getting the same exact message.

What worked to me was to put ON this two APIs: Google+ API Contacts API

in your console: https://console.developers.google.com/project/your-project-id/apiui/api

I do not want to empty the "allowed referers field" as I prefer to have under control from where people can login to my app. I didn't have to change my API Key neither. Just for the records, I am using Spring Social Google 1.1.0

Solution 5 - Javascript

I had the same problem. I tried emptying the referral list, but that did not fix the problem. Then I regenerated the key. The new key gave an "expired key" error. So I reverted to the obsolete key, which now worked.

Solution 6 - Javascript

I encountered the same issue when I was using the Management API of Google Analytics. Here's what worked for me:

  1. Make sure the following APIs are enabled in your API console:

    • YouTube Data API v3
    • YouTube Analytics API
    • Contacts API
    • Google+ API
  2. Make sure the the scopes required by the API properly defined in your application. For Youtube, use scopes required to access API calls yuo

  3. Make sure the CLIENT_ID and CLIENT_SECRET of the Google Project in your API console are the correct ones defined in your client application.

Solution 7 - Javascript

Make sure that the 'Youtube Data API V3' is enabled for your project. You can find it under 'APIs & Auth' -> 'APIs'.
Also, after enabling the Youtube Data APIs for your project, wait for a minute before firing requests using the API key.

Solution 8 - Javascript

in api's and auth credentials in https://console.developers.google.com just leave the key for server applications Edit allowed ips empty this will work

Solution 9 - Javascript

If you use Public API access for action, you must to add your server ip to Allowed IPs list (Select Project -> APIs and Auth -> Credentials). If not, you will get an error as above: "Access Not Configured. Please use Google Developers Console to activate the API for your project."

Please view my attached file to view more enter image description here

Solution 10 - Javascript

You must enable a couple API's for things to work as expected.

First go to https://console.developers.google.com and make sure under "APIs" that you have the Contacts API and Google+ API enabled.

Once that is done you should no longer see that error message.

More can be found-

  1. https://github.com/zquestz/omniauth-google-oauth2/issues/111
  2. https://www.joomlapolis.com/forum/6-news-and-publicity/229505-configuring-cb-connect-7x#263260

Solution 11 - Javascript

I ran into this same issue and what worked for me was using a "Server Key" instead of a "Browser Key". Not sure why that would matter since I was making the request from a browser in both cases, but it works :)

Solution 12 - Javascript

Setting "Referers" to "Any referer allowed" for your project (just leave the field blank)

to goes your console (https://console.developers.google.com/project) and open Api & auth >> Credentials and click under the "Edit allowed referers" empty the input field. hard refresh the query

work Fine.

Solution 13 - Javascript

I faced the same issue and my problem was because I had different names in my project and Google APIs

This is an example with Android

    public MakeRequestTask(GoogleAccountCredential credential) {
            HttpTransport transport = AndroidHttp.newCompatibleTransport();
            JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
            mService = new com.google.api.services.calendar.Calendar.Builder(
                    transport, jsonFactory, credential)
                    .setApplicationName("Google Calendar API Example")
                    .build();
        }

Here the name is "Google Calendar API Example"

enter image description here

and the name in Google APIs is "App Example"

To resolve the problem I changed the name in my project to

        public MakeRequestTask(GoogleAccountCredential credential) {
            HttpTransport transport = AndroidHttp.newCompatibleTransport();
            JsonFactory jsonFactory = JacksonFactory.getDefaultInstance();
            mService = new com.google.api.services.calendar.Calendar.Builder(
                    transport, jsonFactory, credential)
                    .setApplicationName("App Example")
                    .build();
        }

Solution 14 - Javascript

Ok this is old but I figured this out for my case and I thought it might help others. I went to oauth and it seemed to resolve.

the real issue is that if you use an unrestricted key [and maybe, depepending on the api enabled] have a billing account linked; the api should work. If it works unrestricted, you are on the right track.

Once you restrict it to android it will fail again with that key until you sign your app. The easiest way i found was the use a signing config for the variants under android in the gradle file.

signingConfigs {
    debug {
        storeFile file("/users/xxxxxxxxxx/Android/keystores/google_demos/debugandroid.jks")
        storePassword "xxxxxxxxxx"
        keyAlias "com.example.xxxxxxxxxx"
        keyPassword "xxxxxxxx"
    }
}

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDFordView Question on Stackoverflow
Solution 1 - JavascriptOmer AslamView Answer on Stackoverflow
Solution 2 - JavascriptGsxView Answer on Stackoverflow
Solution 3 - JavascriptShrisha KumarView Answer on Stackoverflow
Solution 4 - JavascriptOscar QuonersView Answer on Stackoverflow
Solution 5 - JavascriptLFCView Answer on Stackoverflow
Solution 6 - JavascriptKarloView Answer on Stackoverflow
Solution 7 - JavascriptSumanthView Answer on Stackoverflow
Solution 8 - Javascriptuser3470929View Answer on Stackoverflow
Solution 9 - JavascriptdakiquangView Answer on Stackoverflow
Solution 10 - JavascriptAbrar JahinView Answer on Stackoverflow
Solution 11 - JavascriptdustinrwhView Answer on Stackoverflow
Solution 12 - JavascriptGopal RathodView Answer on Stackoverflow
Solution 13 - JavascriptJorge CasariegoView Answer on Stackoverflow
Solution 14 - JavascriptkeepTrackOfYourStackView Answer on Stackoverflow